oracle docker部署19c
拉取Oracle19c镜像
docker pull registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c
//如果下载慢,可以改成国内镜像源
vim /etc/docker/daemon.json
{
"registry-mirrors": ["https://d7grpode.mirror.aliyuncs.com"]
}
//重启docker生效
systemctl restart docker
创建目录
mkdir -p /mydata/oracle/oradata
chmod 777 /mydata/oracle/oradata
创建实例
docker run -d \
-p 1521:1521 -p 5500:5500 \
-e ORACLE_SID=ORCLCDB \
-e ORACLE_PDB=ORCLPDB1 \
-e ORACLE_PWD=123456 \
-e ORACLE_EDITION=standard \
-e ORACLE_CHARACTERSET=AL32UTF8 \
-v /mydata/oracle/oradata:/opt/oracle/oradata \
--name orcl19c_03 \
registry.cn-hangzhou.aliyuncs.com/zhuyijun/oracle:19c
查看日志
docker logs -f orcl19c_03
连接数据库
//ORCLCDB是pdb,根据环境变量而定
docker exec -it orcl19c_03 bash
sqlplus system/123456@127.0.0.1:1521/ORCLPDB1
页面控制台
访问
https://localhost:5500/em
//账号密码。这是前面设置的
username:sys
password:123456
Container Name:ORCLPDB1