docker-images
docker-images copied to clipboard
Make db docker builds more friendly to thinkering by allowing docker to cache layers
Given the fact that the recommended way to use the DB docker images is to fork the code in this repo, it stands to reason that the users might want to tweak the builds by adding any required changes.
At the moment, the Oracle18xe image is not very friendly to tinkering around because:
- it does both download the Oracle installer and run it in a single docker RUN line
- it does push to the image all the shell files before downloading the Oracle installer
This means that, if the user wants to make a minor change to, say, runOracle.sh, when she will then rebuild the image, the whole download+reinstall will happen again.
I think that it would be better to take advantage of docker's ability to cache each layer in the build process, and:
- split the current RUN command into a few distinct lines
- move the copying of shell files into the container to after the download and execution of the oracle installer
I can send a PR for this if there is agreement
This sounds OK as long as the newly splirt RUN directive doesn't cause the layers to grow too large, i.e. the download, install and removal of the download must still be in a single layer. I agree that copying the scripts after the install would be more efficient from a caching perspective.
Before you submit a PR, can you confirm whether you've signed the Oracle Contributor Agreement?
Agree on download+remove in one step. Will sign and mail back the OCA asap.
Will sign and mail back the OCA asap.
Let me know when you do, so I can action it too.
OCA submitted by email
OCA submitted by email
Groovy. It's Saturday here, so I'll process it on Monday local time.