After adding Oracle DB dump (.dmp) file to /docker-entrypoint-initdb.d/, I get the following error during container startup.
Import: Release 12.1.0.2.0 - Production on Thu Dec 7 10:28:08 2017
Copyright (c) 1982, 2015, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 12c Standard Edition Release 12.1.0.2.0 - 64bit Production
ORA-39002: invalid operation
ORA-39070: Unable to open the log file.
ORA-29283: invalid file operation
ORA-06512: at "SYS.UTL_FILE", line 536
ORA-29283: invalid file operation
This happens due to lack of permissions on /docker-entrypoint-initdb.d/ directory:
root@77c0dae5dcba:/# ls -l
total 80
drwxr-xr-x 2 root root 4096 Nov 27 2015 bin
drwxr-xr-x 2 root root 4096 Apr 10 2014 boot
drwxr-xr-x 5 root root 360 Dec 7 10:31 dev
drwxr-xr-x 2 root root 4096 Dec 7 10:31 docker-entrypoint-initdb.d
...
RUN chown -R oracle:dba docker-entrypoint-initdb.d in Dockerfile does not work. However, if the same is done in entrypoint.sh, it works. So, the solution is, probably, to add appropriate chown to entrypoint.sh.
After adding Oracle DB dump (.dmp) file to /docker-entrypoint-initdb.d/, I get the following error during container startup.
This happens due to lack of permissions on
/docker-entrypoint-initdb.d/
directory:RUN chown -R oracle:dba docker-entrypoint-initdb.d
in Dockerfile does not work. However, if the same is done inentrypoint.sh
, it works. So, the solution is, probably, to add appropriatechown
toentrypoint.sh
.