Adjust Dockerfile to take advantage of docker caching #1219
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I've upgraded archives.mhsc.ca to AtoM 2.6 - it's now hosted using docker. Kudos to you for your work on AtoM and your work to dockerize it!
I've worked with your Dockerfile a bit in updating our customizations and theming. One pain point I hit was that lessc (from make -C /atom/src/plugins/arDominionPlugin) failed due to a theming customization on our end. Fixing and re-running meant re-building the entire container. That meant several very slow iterations while I fixed that up.
I am submitting this PR which re-organizes your Dockerfile a bit. The local source tree almost always has changes from the previous build, so docker can't usually use any cached steps below
COPY . /atom/src
. The main idea in the PR is to move the COPY lower down in the file to allow docker's cache to work. Building PHP doesn't depend on the codebase, so it's not necessary to have COPY above the PHP build.I also added the fcgi package - this allows a docker healthcheck to be defined in the atom container which tests that PHP-FPM is running and producing expected result (I can share the healthcheck code if you are interested).