An extension of the Docker image created by wscherphof. This extension installs Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 with a container and a pluggable database running on Oracle Linux 7
-
Execute Step 1.
-
Create a CDB:
-
Execute the following commands:
$ docker build -t oracle-12c:step2b create_cdb $ docker run --privileged -ti --name create_cdb oracle-12c:step2b /bin/bash # /tmp/create # su - oracle $ sqlplus / as sysdba
-
Run catcdb.sql and set a password for SYS and SYSTEM users (I used oracle as password for both). Additionally, you have to provide a temporary tablespace.
@?/rdbms/admin/catcdb.sql;
Output (takes about 1 hour):
Session altered. Enter new password for SYS: Enter new password for SYSTEM: Enter temporary tablespace name: TEMP Session altered. Connected. old 1: select '&&oracle_home'||'&&slash'||'rdbms'||'&&slash'||'admin'||'&&slash'||'catcon.pl' as rdbms_admin_catcon from dual new 1: select '/u01/app/oracle/product/12.1.0/dbhome_1'||'/'||'rdbms'||'/'||'admin'||'/'||'catcon.pl' as rdbms_admin_catcon from dual old 1: select '&&oracle_home'||'&&slash'||'rdbms'||'&&slash'||'admin' as rdbms_admin from dual new 1: select '/u01/app/oracle/product/12.1.0/dbhome_1'||'/'||'rdbms'||'/'||'admin' as rdbms_admin from dual old 1: select '&&oracle_home'||'&&slash'||'sqlplus'||'&&slash'||'admin'||'&&slash'||'help' as sqlplus_admin_help from dual new 1: select '/u01/app/oracle/product/12.1.0/dbhome_1'||'/'||'sqlplus'||'/'||'admin'||'/'||'help' as sqlplus_admin_help from dual old 1: select '&&oracle_home'||'&&slash'||'sqlplus'||'&&slash'||'admin' as sqlplus_admin from dual new 1: select '/u01/app/oracle/product/12.1.0/dbhome_1'||'/'||'sqlplus'||'/'||'admin' as sqlplus_admin from dual old 1: select '&&oracle_home'||'&&slash'||'javavm'||'&&slash'||'install' as jvm_install from dual new 1: select '/u01/app/oracle/product/12.1.0/dbhome_1'||'/'||'javavm'||'/'||'install' as jvm_install from dual old 1: select '&&oracle_home'||'&&slash'||'xdk'||'&&slash'||'admin' as xdk_admin from dual new 1: select '/u01/app/oracle/product/12.1.0/dbhome_1'||'/'||'xdk'||'/'||'admin' as xdk_admin from dual old 1: select '&&oracle_home'||'&&slash'||'ctx'||'&&slash'||'admin' as ctx_admin from dual new 1: select '/u01/app/oracle/product/12.1.0/dbhome_1'||'/'||'ctx'||'/'||'admin' as ctx_admin from dual old 1: select '&&oracle_home'||'&&slash'||'ctx'||'&&slash'||'admin'||'&&slash'||'defaults' as ctx_admin_defaults from dual new 1: select '/u01/app/oracle/product/12.1.0/dbhome_1'||'/'||'ctx'||'/'||'admin'||'/'||'defaults' as ctx_admin_defaults from dual old 1: select '&&oracle_home'||'&&slash'||'ord'||'&&slash'||'admin' as ord_admin from dual new 1: select '/u01/app/oracle/product/12.1.0/dbhome_1'||'/'||'ord'||'/'||'admin' as ord_admin from dual old 1: select '&&oracle_home'||'&&slash'||'ord'||'&&slash'||'im'||'&&slash'||'admin' as im_admin from dual new 1: select '/u01/app/oracle/product/12.1.0/dbhome_1'||'/'||'ord'||'/'||'im'||'/'||'admin' as im_admin from dual old 1: select '&&oracle_home'||'&&slash'||'olap'||'&&slash'||'admin' as olap_admin from dual new 1: select '/u01/app/oracle/product/12.1.0/dbhome_1'||'/'||'olap'||'/'||'admin' as olap_admin from dual old 1: select '&&oracle_home'||'&&slash'||'md'||'&&slash'||'admin' as md_admin from dual new 1: select '/u01/app/oracle/product/12.1.0/dbhome_1'||'/'||'md'||'/'||'admin' as md_admin from dual old 1: select '&&oracle_home'||'&&slash'||'apex' as apex_home from dual new 1: select '/u01/app/oracle/product/12.1.0/dbhome_1'||'/'||'apex' as apex_home from dual catcon: ALL catcon-related output will be written to catalog_catcon_2343.lst catcon: See catalog*.log files for output generated by scripts catcon: See catalog_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to catproc_catcon_2396.lst catcon: See catproc*.log files for output generated by scripts catcon: See catproc_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to catoctk_catcon_2758.lst catcon: See catoctk*.log files for output generated by scripts catcon: See catoctk_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to owminst_catcon_2815.lst catcon: See owminst*.log files for output generated by scripts catcon: See owminst_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to pupbld_catcon_2870.lst catcon: See pupbld*.log files for output generated by scripts catcon: See pupbld_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to hlpbld_catcon_2923.lst catcon: See hlpbld*.log files for output generated by scripts catcon: See hlpbld_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to initjvm_catcon_2976.lst catcon: See initjvm*.log files for output generated by scripts catcon: See initjvm_*.lst files for spool files, if any A process terminated prior to completion. Review the initjvm*.log files to identify the failure Died at /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/catcon.pm line 6149. catcon: ALL catcon-related output will be written to initxml_catcon_3001.lst catcon: See initxml*.log files for output generated by scripts catcon: See initxml_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to xmlja_catcon_3056.lst catcon: See xmlja*.log files for output generated by scripts catcon: See xmlja_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to catjava_catcon_3109.lst catcon: See catjava*.log files for output generated by scripts catcon: See catjava_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to catxdbj_catcon_3162.lst catcon: See catxdbj*.log files for output generated by scripts catcon: See catxdbj_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to catctx_catcon_3215.lst catcon: See catctx*.log files for output generated by scripts catcon: See catctx_*.lst files for spool files, if any catcon.pl: completed successfully User altered. catcon: ALL catcon-related output will be written to dr0defin_catcon_3274.lst catcon: See dr0defin*.log files for output generated by scripts catcon: See dr0defin_*.lst files for spool files, if any catcon.pl: completed successfully User altered. catcon: ALL catcon-related output will be written to dbmsxdbt_catcon_3327.lst catcon: See dbmsxdbt*.log files for output generated by scripts catcon: See dbmsxdbt_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to ordinst_catcon_3380.lst catcon: See ordinst*.log files for output generated by scripts catcon: See ordinst_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to catim_catcon_3433.lst catcon: See catim*.log files for output generated by scripts catcon: See catim_*.lst files for spool files, if any A process terminated prior to completion. Review the catim*.log files to identify the failure Died at /u01/app/oracle/product/12.1.0/dbhome_1/rdbms/admin/catcon.pm line 6149. catcon: ALL catcon-related output will be written to olap.sql_catcon_3458.lst catcon: See olap.sql*.log files for output generated by scripts catcon: See olap.sql_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to mdinst_catcon_3518.lst catcon: See mdinst*.log files for output generated by scripts catcon: See mdinst_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to catols_catcon_3575.lst catcon: See catols*.log files for output generated by scripts catcon: See catols_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to catapx_catcon_3630.lst catcon: See catapx*.log files for output generated by scripts catcon: See catapx_*.lst files for spool files, if any catcon: ALL catcon-related output will be written to catmac_catcon_3768.lst catcon: See catmac*.log files for output generated by scripts catcon: See catmac_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to catclust_catcon_3833.lst catcon: See catclust*.log files for output generated by scripts catcon: See catclust_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to catbundleapply_catcon_3886.lst catcon: See catbundleapply*.log files for output generated by scripts catcon: See catbundleapply_*.lst files for spool files, if any catcon.pl: completed successfully catcon: ALL catcon-related output will be written to utlrp_catcon_3939.lst catcon: See utlrp*.log files for output generated by scripts catcon: See utlrp_*.lst files for spool files, if any catcon.pl: completed successfully Connected. Session altered. Pluggable database altered. Pluggable database altered. PL/SQL procedure successfully completed. Session altered. PL/SQL procedure successfully completed. Session altered. Pluggable database altered. Pluggable database altered. Session altered. Session altered. Session altered.
-
Exit SQLPlus and execute step Create PDB
SQL> exit; # /tmp/create_pdb
-
Execute conf_finish.sql
# sqlplus / as sysdba @?/config/scripts/conf_finish.sql
Output:
PL/SQL procedure successfully completed. PL/SQL procedure successfully completed. Database closed. Database dismounted. ORACLE instance shut down. Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options
-
Exit oracle user's context
# exit
-
Exit docker container
# exit
-
Commit container changes
$ docker commit create_cdb oracle-12c:create_cdb
- Finish installation:
$ docker build -t oracle-12c finish
$ docker run --privileged -dP --name orcl oracle-12c
A new CDB (orcl) is created and a PDB named orcl_pdb. PDB's user is pdb_user (password: oracle)
To see the port where oracle is running locally, execute:
$ docker port orcl 1521