Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Is it possible to move database configuration to the Dockerfile? #31

Open
deusaquilus opened this issue Mar 1, 2019 · 1 comment
Open
Labels
question Further information is requested

Comments

@deusaquilus
Copy link

The ${ORACLE_CMD} configure stage takes a very long time, too long for my CI build to be able to do. I tried moving this step into the Dockerfile which builds the container successfully, but then, attempting to run sqlcmd yields the following error:

> $ORACLE_HOME/bin/sqlplus sys/Oracle18@localhost/XE as sysdba
SQL*Plus: Release 18.0.0.0.0 - Production on Fri Mar 1 08:55:15 2019
Version 18.4.0.0.0

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

ERROR:
ORA-12541: TNS:no listener

Is there any way around this?

@fuzziebrain
Copy link
Owner

@deusaquilus Yes, that command takes a while to run. I could think of two options:

  1. Run the container and make sure you have the oradata volume mounted to your host file system. In your CI/CD tool, when you run the container, you should do the same and the "configure" step would be skipped. You'll need to use a the original oradata before each build to have the database in its pristine state.
  2. Comment out the VOLUME instruction before you perform the build. Run the container and then create a Docker image from the running container. I haven't tested this to work, but it might be worth a shot.

@fuzziebrain fuzziebrain added the question Further information is requested label Mar 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants