一、拉取oracle11g镜像并创建容器

  1. docker pull registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g
  1. docker run -d -p 1521:1521 --name oracle11g registry.cn-hangzhou.aliyuncs.com/helowin/oracle_11g

二、容器配置

  1. docker exec -it oracle11g bash
  1. su root
  1. export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2
  2. export ORACLE_SID=helowin
  3. export PATH=$ORACLE_HOME/bin:$PATH
  1. source /etc/profile
  1. ln -s $ORACLE_HOME/bin/sqlplus /usr/bin
  1. su - oracle
  1. sqlplus /nolog
  1. conn /as sysdba
  1. alter user system identified by system;
  1. alter user sys identified by system;
  1. create user test identified by test;
  1. grant connect,resource,dba to test;
  1. ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED;
  1. alter system set processes=10000 scope=spfile;

:::info 修改以上信息后,需要重新启动数据库 :::

  1. conn /as sysdba
  1. shutdown immediate;
  1. startup;