Skip to content

docker: add thin backend runtime image#74040

Draft
carl-codeorg wants to merge 1 commit into
stagingfrom
codex/docker-thin-runtime
Draft

docker: add thin backend runtime image#74040
carl-codeorg wants to merge 1 commit into
stagingfrom
codex/docker-thin-runtime

Conversation

@carl-codeorg

@carl-codeorg carl-codeorg commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

First of a series of 4 PRs to introduce a working local k8s setup. Once the PRs are in we will be in a state where:

  • The docker image hierarchy starts with a ruby-slim base image, and builds on top of that for more resource-intensive images that require apps build, curriculum content seeding, etc. This PR introduces the ruby-slim based image. It was developed in parallel with feat(docker): add cdo-base shared minimal runtime image #73851 and we will eventually update the k8s templates to use that as a base. For now, we can get the local k8s setup working on the image from this PR.
  • The full local k8s setup can be run on a typical developer machine: Macbook Pro with 16GB of RAM, on Docker Desktop or Minikube.
  • The default skaffold profile is backend-only. The first component to be moved into k8s will be ActiveJob workers, which don't require the frontend.

Other things this PR touches:

  • Moves Bootsnap out of dev dependencies to take advantage of it in other envs.
  • Adds some guards around Prosopite usage to account for cases where the gem isn't installed due to bundler config.
  • Adds keepfiles as necessary to maintain the mimic feature; these might be removed in the future if we don't find it useful.

Links

  • Jira:

Testing story

Deployment notes

Privacy and security

@stephenliang
stephenliang self-requested a review July 23, 2026 18:34
@@ -1,4 +1,4 @@
if Rails.env.development?
if Rails.env.development? && Gem.loaded_specs.key?('prosopite')

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Seems kind of annoying to have to workaround prosopite here. Wondering if I look into a follow-up change that would only initialize prosopite in dev if a flag is set vs. always initing? Something like CDO.prosopite_enabled or something.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yeah good point. It's possible we can remove this extra guard depending on how we ultimately decide to configure the RAILS_ENV and BUNDLE_WITHOUT for the k8s dev environment.

@nicklathe nicklathe left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This LGTM, I like the new direction with defaulting to a base dev image.

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.

2 participants