- 拉取镜像
docker pull doctorkirk/oracle-19c
mkdir -p /data/docker/oracle/oracle-19c/oradata
cd /data/docker/oracle
chown -R 54321:54321 oracle-19c/
docker run -d --name oracle-19c -p 51521:1521 -e ORACLE_SID=cc -e ORACLE_PWD=doud -v /data/docker/oracle/oracle-19c/oradata/:/opt/oracle/oradata doctorkirk/oracle-19c
1: 拉取镜像
docker pull registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c
- 新建数据文件夹
mkdir -p /data/docker/oracle/oracle-19c/oradata
cd /data/docker/oracle
chown -R 54321:54321 oracle-19c/
- 启动
docker run --name oracle-19c \
-p 1521:1521 -p 5500:5500 \
-e ORACLE_SID=orcl \
-e ORACLE_PDB=orclpdb1 \
-e ORACLE_PWD=doud \
-e ORACLE_CHARACTERSET=zhs16gbk \
-e ORACLE_BASE=/opt/oracle \
-e ORACLE_HOME=/opt/oracle/product/19c/dbhome_1 \
-e PATH=/opt/oracle/product/19c/dbhome_1/bin:/opt/oracle/product/19c/dbhome_1/OPatch/:/usr/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \
-v /data/docker/oracle/oracle-19c/oradata:/opt/oracle/oradata \
registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c
- 修改密码
docker exec oracle-19c ./setPassword.sh 123456