Skip to content

Initializing data within the container build #187

Answered by gvenzl
jldhtx asked this question in Q&A
Discussion options

You must be logged in to vote

Hey @jldhtx,

Thanks a lot for using these images!

Yeah, this is pretty straightforward, the container-entrypoint.sh has a --nowait option that will do everything it usually does, just not tail the alert.log file and hence other operations can be executed afterward.

So, for example, what you can do is:

  1. Extend the image of your choice
  2. Start the DB via container-entrypoint.sh --nowait
  3. Run whatever setup you need
  4. Shutdown the database
    4.1) Compress the DB files if you are not using the *-faststart flavor
  5. Commit the new image

For example:

FROM gvenzl/oracle-xe:21-slim-faststart

ARG ORACLE_RANDOM_PASSWORD=y

RUN container-entrypoint.sh --nowait && \
    echo "Stopping database..." && \
    e…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@jldhtx
Comment options

@gvenzl
Comment options

Answer selected by jldhtx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants