Repository: govuk-ruby-images
Base container images for GOV.UK Ruby apps
README
What’s in this repo
The govuk-ruby-images repository defines OCI container images for building and running production Ruby applications on Kubernetes.
Usage
Use the two images in your app’s Dockerfile:
ARG ruby_version=3.3
ARG base_image=ghcr.io/alphagov/govuk-ruby-base:$ruby_version
ARG builder_image=ghcr.io/alphagov/govuk-ruby-builder:$ruby_version
FROM $builder_image AS builder
your build steps here
FROM $base_image
your app image steps here
See alphagov/frontend/Dockerfile for a full, real-world example.
Common problems and resolutions
ERROR: failed to solve: cannot copy to non-directory: /var/lib/docker/overlay2/.../merged/app/tmp
Add tmp/
to your .dockerignore
. This is necessary because we symlink
$APP_HOME/tmp
to /tmp
as a workaround for some badly-behaved gems that
assume they can write to Path.join(Rails.root, 'tmp')
so that we can run with
readOnlyRootFilesystem
.
Add or update a Ruby version
The file build-matrix.json defines the Ruby versions and image tags that we build.
The checksum
field is currently the SHA-256 hash of the Ruby source tarball. We verify this in the build.
See Ruby Releases for the list of available Ruby tarballs and their SHA digests.
Team
GOV.UK Platform Engineering team looks after this repo. If you’re inside GDS, you can find us in #govuk-platform-engineering or view our kanban board.