Skip to content

Update Dockerfiles and publish images#64

Draft
willbarton wants to merge 3 commits intomainfrom
update/dockerfiles
Draft

Update Dockerfiles and publish images#64
willbarton wants to merge 3 commits intomainfrom
update/dockerfiles

Conversation

@willbarton
Copy link
Copy Markdown
Member

This change updates our front-end and back-end Dockerfiles to add multiple stages, dev in both, and a builder stage in the front-end and a base stage in the back-end. The front-end builder stage and back-end base stages are then built as images and pushed to GHCR with our docker-build-push action.

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-push action. Right now I'm using this PR to test this change.

Checklist

  • PR has an informative and human-readable title
  • Changes are limited to a single goal (no scope creep)
  • Code can be automatically merged (no conflicts)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Visually tested in supported browsers and devices (see checklist below 👇)
  • Project documentation has been updated
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist

Browsers

  • Chrome
  • Firefox
  • Safari
  • Internet Explorer 8, 9, 10, and 11
  • Edge
  • iOS Safari
  • Chrome for Android

Accessibility

  • Keyboard friendly
  • Screen reader friendly

Other

  • Flexible from small to large screens
  • No linting errors or warnings
  • JavaScript tests are passing

@willbarton willbarton force-pushed the update/dockerfiles branch 2 times, most recently from 06cdf43 to 65d9aa8 Compare May 7, 2026 15:55
willbarton added 3 commits May 7, 2026 12:04
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.
@willbarton willbarton force-pushed the update/dockerfiles branch from 65d9aa8 to 82f6130 Compare May 7, 2026 16:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant