-
Hi! Loving the images! So helpful in creating some local test environments when dealing with a monolith oracle app. Is it possible to modify the docker file to start the database, run initial data population scripts, then down the database and continue as usual? My use case is to provide an image in a registry other developers can use to pull down a database initialized for our testing with static data and the correct privileges. I've done similar things with the MSSQL on linux image by launching the main sqlservr binary, waiting for it to up, running scripts, then stopping it. Before I dove into it, I figured I would ask people much smarter than me if they'd ever tried this approach and if I'm setting myself up for failure :) |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Hey @jldhtx, Thanks a lot for using these images! Yeah, this is pretty straightforward, the So, for example, what you can do is:
For example:
That will:
The nice thing about using Of course, you could do whatever else you need to do after 3. When building the image (not the
Then, when running a container from the new image:
You happen to have the starter set data ready to go:
Hope this helps! |
Beta Was this translation helpful? Give feedback.
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:
container-entrypoint.sh --nowait
4.1) Compress the DB files if you are not using the
*-faststart flavor
For example: