一、拉取oracle11g镜像并创建容器
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
docker run -d -p 1521:1521 --name oracle11g registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
二、容器配置
docker exec -it oracle11g bash
su root
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2
export ORACLE_SID=helowin
export PATH=$ORACLE_HOME/bin:$PATH
source /etc/profile
ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
su - oracle
sqlplus /nolog
conn /as sysdba
alter user system identified by system;
alter user sys identified by system;
create user test identified by test;
grant connect,resource,dba to test;
ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
alter system set processes=10000 scope=spfile;
:::info 修改以上信息后,需要重新启动数据库 :::
conn /as sysdba
shutdown immediate;
startup;