version: '3.4'
services:
oracle19:
image: harbor.insightone.cn/oracle/oracle:19.3.0.0
container_name: oracle19
hostname: oracle19
restart: always
user: "54321"
ports:
- "1521:1521"
- "5500:5500"
environment:
#The Oracle Database SID that should be used (default:ORCLCDB)
ORACLE_SID: ORCLCDB
#The Oracle Database PDB name that should be used (default: ORCLPDB1)
ORACLE_PDB: ORCLPDB1
#The Oracle Database SYS, SYSTEM and PDBADMIN password (default: auto generated)
ORACLE_PWD: AbcD1234
#The total memory in MB that should be used for all SGA components (optional)
INIT_SGA_SIZE: 4096
#The target aggregate PGA memory in MB that should be used for all server processes attached to the instance (optional)
INIT_PGA_SIZE: 4096
#The Oracle Database Edition (enterprise/standard, default: enterprise)
ORACLE_EDITION: enterprise
#The character set to use when creating the database (default: AL32UTF8)
ORACLE_CHARACTERSET: AL32UTF8
#To enable archive log mode when creating the database (default: false). Supported 19.3 onwards.
ENABLE_ARCHIVELOG: "true"
#设置时区
TZ: Asia/Shanghai
volumes:
#设置数据目录
- ./oradata:/opt/oracle/oradata
#数据库startup后执行的脚本
- ./startup:/opt/oracle/scripts/startup
#数据库setup后执行的脚本
- ./setup:/opt/oracle/scripts/setup
networks:
test:
ipv4_address: 172.18.0.19
networks:
test:
external: true
alter session set container=ORCLPDB1;
create user "RKG" identified by "AbcD1234";
grant connect,resource,dba to rkg;
create tablespace rkg datafile '/opt/oracle/oradata/ORCLCDB/ORCLPDB1/rkg.dbf' size 10g;
alter user RKG default tablespace rkg;