docker search oracle
查找oracle镜像
docker pull docker.io/sath89/oracle-12c
下载oracle镜像
docker run --name oracle -d -p 8081:8080 -p 1522:1521 sath89/oracle-12c
docker run --name oracle -d -p 8081:8080 -p 1522:1521 sath89/oracle-12c
创建了两个oracle实例
docker logs -f **** 是查看运行时日志
docker exec -it oracle /bin/bash;
进入root
$ORACLE_HOME/bin/sqlplus / as sysdba
连接oracle
然后输入用户名密码 system /oracle
1、执行语句:
create user 用户名 identified by 密码;
其中用户名需要为英文,密码为数字或字母或英文符号或组合。
2、执行完毕后,可按需要给用户赋予相应的权限,如:
grant connect,resource,dba to 用户名;
3.创建表空间给指定 用户
create tablespace 用户名 datafile 'E:\oracle\oradata\whcdb\whc.dbf' size 100M;
docker commit -m="oracle12" -a="chend" 753ac6a0a5cb oracle_chend 创建自己的镜像;
执行这个的话 需要将 运行的oracle关闭