Docker-images: User Scripts Does not Work on store/oracle/database-enterprise:12.2.0.1

Created on 13 Mar 2019  路  3Comments  路  Source: oracle/docker-images

Hi! Following the instructions what I found at https://github.com/oracle/docker-images/tree/master/OracleDatabase/SingleInstance I have copied my user script into all sugested locations, and nothing ocurred. It is my test-dockerfile:

FROM store/oracle/database-enterprise:12.2.0.1 as dbbase

RUN mkdir /tmp/startup
RUN chmod 777 /tmp/startup

ADD ./startup-db/* /tmp/startup/
ADD ./startup-db/01_start.sh /tmp/startup/
ADD ./startup-db/01_start.sh /docker-entrypoint-initdb.d/
ADD ./startup-db/01_start.sh /u01/app/oracle/scripts/
ADD ./startup-db/01_start.sh /u01/app/oracle/scripts/setup
ADD ./startup-db/01_start.sh /u01/app/oracle/scripts/startup

EXPOSE 1521
EXPOSE 5500

And my log...

mbp-de-jose:~ jose$ docker logs -f cid-v2-db-run
Setup Oracle Database
Oracle Database 12.2.0.1 Setup
Wed Mar 13 14:17:37 UTC 2019

Check parameters ......
log file is : /home/oracle/setup/log/paramChk.log
paramChk.sh is done at 0 sec

untar DB bits ......
log file is : /home/oracle/setup/log/untarDB.log
untarDB.sh is done at 82 sec

config DB ......
log file is : /home/oracle/setup/log/configDB.log
Wed Mar 13 14:18:59 UTC 2019
Start Docker DB configuration
Call configDBora.sh to configure database
Wed Mar 13 14:19:01 UTC 2019
Configure DB as oracle user
Setup Database directories ...

SQL*Plus: Release 12.2.0.1.0 Production on Wed Mar 13 14:19:02 2019

Copyright (c) 1982, 2016, Oracle.  All rights reserved.

Connected to an idle instance.

SQL> 
File created.

SQL> ORACLE instance started.

Total System Global Area 1342177280 bytes
Fixed Size          8792536 bytes
Variable Size         352323112 bytes
Database Buffers      973078528 bytes
Redo Buffers            7983104 bytes
Database mounted.
Database opened.
SQL> 
Database altered.

SQL> 
NAME                     TYPE    VALUE
------------------------------------ ----------- ------------------------------
spfile                   string  /u01/app/oracle/product/12.2.0
                         /dbhome_1/dbs/spfileORCLCDB.or
                         a
SQL> 
NAME                     TYPE    VALUE
------------------------------------ ----------- ------------------------------
encrypt_new_tablespaces          string  CLOUD_ONLY
SQL> 
User altered.

SQL> 
User altered.

SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
update password

Enter password for SYS: 
create pdb : ORCLPDB1

SQL*Plus: Release 12.2.0.1.0 Production on Wed Mar 13 14:19:14 2019

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL>   2    3    4    5  
Pluggable database created.

SQL> 
Pluggable database altered.

SQL> 
Pluggable database altered.

SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production
Reset Database parameters

SQL*Plus: Release 12.2.0.1.0 Production on Wed Mar 13 14:19:32 2019

Copyright (c) 1982, 2016, Oracle.  All rights reserved.


Connected to:
Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

SQL> 
System altered.

SQL> Disconnected from Oracle Database 12c Enterprise Edition Release 12.2.0.1.0 - 64bit Production

LSNRCTL for Linux: Version 12.2.0.1.0 - Production on 13-MAR-2019 14:19:32

Copyright (c) 1991, 2016, Oracle.  All rights reserved.

Starting /u01/app/oracle/product/12.2.0/dbhome_1/bin/tnslsnr: please wait...

TNSLSNR for Linux: Version 12.2.0.1.0 - Production
System parameter file is /u01/app/oracle/product/12.2.0/dbhome_1/admin/ORCLCDB/listener.ora
Log messages written to /u01/app/oracle/diag/tnslsnr/4d44658445e4/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=0.0.0.0)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 12.2.0.1.0 - Production
Start Date                13-MAR-2019 14:19:32
Uptime                    0 days 0 hr. 0 min. 0 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/12.2.0/dbhome_1/admin/ORCLCDB/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/4d44658445e4/listener/alert/log.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=0.0.0.0)(PORT=1521)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
The listener supports no services
The command completed successfully

DONE!
Remove password info
Docker DB configuration is complete !
configDB.sh is done at 115 sec

Done ! The database is ready for use .
# ===========================================================================  
# == Add below entries to your tnsnames.ora to access this database server ==  
# ====================== from external host =================================  
ORCLCDB=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=))
    (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORCLCDB.localdomain)))     
ORCLPDB1=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=))
    (CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=ORCLPDB1.localdomain)))     
#                                                                              
#ip-address : IP address of the host where the container is running.           
#port       : Host Port that is mapped to the port 1521 of the container.      
#                                                                              
# The mapped port can be obtained from running "docker port "  
# ===========================================================================  
2019-03-13T14:19:29.893186+00:00
ORCLPDB1(3):Opatch validation is skipped for PDB ORCLPDB1 (con_id=0)
2019-03-13T14:19:31.870286+00:00
ORCLPDB1(3):Opening pdb with no Resource Manager plan active
Pluggable database ORCLPDB1 opened read write
Completed:     alter pluggable database ORCLPDB1 open
    alter pluggable database all save state
Completed:     alter pluggable database all save state
2019-03-13T14:19:32.093852+00:00
ALTER SYSTEM SET encrypt_new_tablespaces='DDL' SCOPE=BOTH;
database

Most helpful comment

Is there a date expected for the next release of images, to make this functionality available?

All 3 comments

Unfortunately the user scripts PR came after the 12.2 images were made available and have not been retro fitted into the images. They are just present in the Github build files. If you need/want to use them, please build your own image for now.

We are currently working on lining up the images for the new versions going forward.

Is there a date expected for the next release of images, to make this functionality available?

What image versions do have this capability? +1 to @mkantzer's query above.

Was this page helpful?
0 / 5 - 0 ratings