docker 安装 Oracle 19c

  1. 拉取镜像 docker pull doctorkirk/oracle-19c
  2. mkdir -p /data/docker/oracle/oracle-19c/oradata
  3. cd /data/docker/oracle
  4. chown -R 54321:54321 oracle-19c/
  5. 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

参考 https://my.oschina.net/u/4416988/blog/4479743

1: 拉取镜像

docker pull registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c
  1. 新建数据文件夹
mkdir -p /data/docker/oracle/oracle-19c/oradata
cd /data/docker/oracle
chown -R 54321:54321 oracle-19c/
  1. 启动
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
  1. 修改密码
docker exec  oracle-19c ./setPassword.sh 123456

评论栏