创建oracle容器
docker run -d -p 30022:22 -p 31521:1521 --name oracle11g oracleinanutshell/oracle-xe-11g
sqlplus登录(容器内)
sudo docker exec -it oracle11g /bin/bash
sqlplus system/oracle@//localhost:1521/xe
创建表空间(容器内)
create tablespace BDCHLWPT logging datafile '/opt/oracle/TEST001.dbf' size 128M autoextend on next 100M maxsize 1024M extent management local;
远程连接
hostname: 192.168.100.101
port: 31521
sid: xe
username: system
password: oracle
初始化sql脚本路径
FROM oracleinanutshell/oracle-xe-11g
ADD init.sql /docker-entrypoint-initdb.d/
ADD script.sh /docker-entrypoint-initdb.d/