1、下载oracle11g for linux文件
2、在主机上创建安装目录及备份文件目录
mkdir -p /Users/xxx/soft/Oracle11g/oracle
mkdir -p /Users/xxx/soft/Oracle11g/dpdump
3、解压oracle11g安装包至 /Users/xxx/soft/Oracle11g/oracle
cd <oracle下载目录>
unzip -o linux.x64_11gR2_database_1of2.zip -d /Users/xxx/soft/Oracle11g/oracle
unzip -o linux.x64_11gR2_database_2of2.zip -d /Users/xxx/soft/Oracle11g/oracle
4、拉取oracle镜像
docker pull jaspeen/oracle-11g
5、创建容器
docker run --privileged --name oracle11g -p 1521:1521 -v /Users/xxx/soft/Oracle11g/oracle:/install -v /Users/xxx/soft/Oracle11g/dpdump:/opt/oracle/dpdump jaspeen/oracle-11g
6、进入容器
docker exec -it oracle11g /bin/bash
7、更换oracle用户
su - oracle
8、通过sqlplus进入数据库
sqlplus / as sysdba
9、修改初始账号
alter user system identified by system;
alter user scott identified by tiger;
10、解锁scott用户
alter user scott account unlock;
11、赋予scott权限
grant dba to scott;
ps: