1. 下载镜像源
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g --pull 镜像(6个多G)
2. 运行容器
docker run -d -p 1521:1521 -v /data/oracle:/data/oracle --name oracle11 registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
3.进入容器
docker exec -it oracle11 /bin/bash
4. 加载环境变量
source /home/oracle/.bash_profile
5.创建用户
sqlplus /nolog
sql> connect /as sysdba
sql> create user test identified by test;
grant connect,resource,dba to test;
注: root:用户的密码是helowin
网友评论