1.拉取镜像
docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g

2.创建容器
docker run -d -it -p 11521:1521 --name my-oracle --restart=always --mount source=oracle_vol,target=/home/oracle/app/oracle/oradata registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
  3.配置连接信息 进入容器内部切换root  4.配置环境变量 vi /etc/profile
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
5.创建软连接方便调用sqlplus
ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
6.切换oracle用户配置连接
su oracle
sqlplus /nolog
conn /as sysdba
7.修改系统密码或者创建新的连接用户
alter user system identified by 新密码;
alter user sys identified by 新密码;
alter profile default limit PASSWORD_LIFE_TIME UNLIMITED;
我创建的用户
create user 新用户名 identified by 密码;
grant connect,resource,dba to 新用户名;
注意最后的英文逗号
create user mark identified by 123456;
grant connect,resource,dba to mark;
操作记录 
8.使用IDEA进行连接测试 
|