Update Dockerfiles and publish images#64
Draft
willbarton wants to merge 3 commits intomainfrom
Draft
Conversation
06cdf43 to
65d9aa8
Compare
This adds "dev" and "builder" stages to the front-end Dockerfile and makes some minor updates from our internal Dockerfile. The intention is to preserve the ability to use `yarn run` in development, and provider a base image `builder` that can be used when composing the full application. I've also put `yarn run` as a `CMD` in the `dev` container, so that it will always run unless that's overridden, so it can move out of the compose file.
This adds "base" and "dev" stages to the back-end Dockerfile and makes some minor updates from our internal Dockerfile. The intention is to be able to run "dev" with `manage.py` and preserve the ability to inherit from the base image for extending the application.
This uses the CFPB docker-build-push action to build and publish the front-end builder and back-end base images to GHCR.
65d9aa8 to
82f6130
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This change updates our front-end and back-end Dockerfiles to add multiple stages,
devin both, and abuilderstage in the front-end and abasestage in the back-end. The front-endbuilderstage and back-endbasestages are then built as images and pushed to GHCR with ourdocker-build-pushaction.I've brought over some things from our internal Dockerfile, and I've also tried to do some light refactoring to improve layer caching.
This will require a corresponding set of internal changes to use these images. For the time being development this change should be transparent, and this PR could be merged independent of those internal changes.
Note: this draft PR currently uses a pin to https://github.com/cfpb/actions/compare/add/short-sha-tag-and-target that adds short-sha and a target input to the CFPB
docker-build-pushaction. Right now I'm using this PR to test this change.Checklist
Testing checklist
Browsers
Accessibility
Other