Skip to content

Conversation

@cflipse
Copy link
Collaborator

@cflipse cflipse commented Sep 12, 2025

What is the goal of this PR and why is this important?

Update the production Dockerfile

This updates the base image of the Dockerfile from ruby 2.7 to 3.3, and
from bookworm to the slim variant. These are smaller debian
images, with much fewer installed packages.

The image size is roughly halved, from just under 2GB to under 1GB.

The docker build is also migrated to a multistage build, separating the
asset compilation from the final image, so we deploy without acutal
-dev packages installed in the running server.

a handful of asset compilation configuration were needed to ensure that
the manifests and compiled information were actually availible in the
server image.

  • Dockerfile builds the base successfully now
  • we won't actually be behind nginx here
  • pare down the libraries that are not actually used
  • convert to a multistage build
  • use the -slim image
  • remove yarn shim
  • add css manifest
  • add a "production" service
  • raise if asked for an asset we don't know about

Copy link
Collaborator

@maebeale maebeale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🆗 💥

@cflipse cflipse merged commit b232568 into main Sep 12, 2025
2 checks passed
@cflipse cflipse deleted the prod-dockerfile branch September 12, 2025 21:18
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.

3 participants