参考
【DB宝11】在Docker中只需2步即可拥有Oracle 11g企业版环境(11.2.0.3)
拉取镜像
# 从Docker hub下载,网络不好时,一般比较慢
docker pull lhrbest/oracle_11g_ee_lhr_11.2.0.3:1.0
# 可以选择从阿里云下载
docker pull registry.cn-hangzhou.aliyuncs.com/lhrbest/oracle_11g_ee_lhr_11.2.0.3:1.0
# 从阿里云下载后可以tag成如下形式
docker tag registry.cn-hangzhou.aliyuncs.com/lhrbest/oracle_11g_ee_lhr_11.2.0.3:1.0 lhrbest/oracle_11g_ee_lhr_11.2.0.3:1.0
创建并启动数据库
# 创建容器
docker run -itd --name lhrora11203 -h lhrora11203 --privileged=true -p 1521:1521 -p 222:22 -p 1158:1158 lhrbest/oracle_11g_ee_lhr_11.2.0.3:1.0 init
# 进入容器
docker exec -it lhrora11203 bash
# 启动数据库和监听
su - oracle
lsnrctl start
sqlplus / as sysdba
startup
创建一个测试 schema
-- 连接到数据库
sqlplus / as sysdba
-- 创建用户
CREATE USER thresh IDENTIFIED BY thresh;
-- 授予基本连接权限
GRANT CONNECT TO thresh;
-- 授予创建对象的权限
GRANT CREATE TABLE, CREATE VIEW, CREATE PROCEDURE TO thresh;
标签:11g,--,0.3,11.2,oracle,docker
From: https://www.cnblogs.com/bibleghost/p/18312916