//拉取oracle 鏡像
# docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
//等待完成
#docker images;

//實例化鏡像
#docker run -d -p 1521:1521 --name oracle11g registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
//創建成功,顯示容器id
c0b56a8daf90b9bd013cbda38c0593d0fb9a8a828155d7b1c2e8eca6e4fe69d4
//啟動容器
# docker start oracle11g
oracle11g
//進入鏡像進行配置
#docker exec -it oracle11g bash //進入后主機名顯示 [oracle@c0b56a8daf90 /]
//進入到root 用戶下 密碼為:helowin 成功后主機名為 [root@c0b56a8daf90 /]
$ su root
//配置環境變量
# 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
//創建軟連接
# ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
//切換到oracle 用戶 成功后主機名顯示 [oracle@c0b56a8daf90 ~]
# su - oracle
//登錄sqlplus 修改sys、system 密碼
# sqlplus /nolog
SQL> conn /as sysdba //顯示 Connected.
SQL> alter user system identified by system; //顯示User altered
SQL>alter user sys identified by sys; //顯示User altered
創建用戶 授予權限
create user test identified by test;
grant connect,resource,dba to test;
客戶端工具登錄 navicate

本文來自:https://blog.csdn.net/qq_38380025/article/details/80647620