Skip to content

Collapse base/dev/student into one image: ghcr.io/ppbds/devcontainer#17

Merged
davidkane9 merged 1 commit into
mainfrom
one-image
Jul 7, 2026
Merged

Collapse base/dev/student into one image: ghcr.io/ppbds/devcontainer#17
davidkane9 merged 1 commit into
mainfrom
one-image

Conversation

@davidkane9

Copy link
Copy Markdown
Contributor

One Dockerfile at the repo root, one CI job, one release train, one image name:

ghcr.io/ppbds/devcontainer

Why: dev's delta over base was qpdf + five R packages (trivial vs the ~4.6 GB image) with one consumer; the base→downstream split cost BASE_TAG plumbing, a two-job CI dependency, and cross-image permission bugs (the 2026-07 lock-file failure happened exactly at that boundary).

Beyond concatenation:

  • qpdf joins the main apt list; dev's R packages install as rstudio
  • PKG_SYSREQS=false now applies image-wide (it was student-only)
  • requirements.txt/.lock move to repo root; .dockerignore added
  • CLAUDE.md + README rewritten; runbook updated for the single job

Rollout: old GHCR packages keep their final tags (existing pins unaffected) but get no new versions. Follow-ups after v1.0.0: repin codespace-starter, and pin PPBDS/primer (per David — no more :latest there).

Validation build green (all smoke tests incl. brms/Stan + catboost e2e): https://github.com/PPBDS/devcontainers/actions/runs/28882966938
New package confirmed publicly pullable (anonymous manifest GET → 200).

🤖 Generated with Claude Code

One Dockerfile at the repo root, one CI job, one release train. The dev
image's delta over base (qpdf + devtools/pkgdown/roxygen2/testthat/
usethis) was trivial against the ~4.6 GB full image, its only consumer
was PPBDS/primer, and the base->downstream split cost BASE_TAG plumbing,
a two-job CI dependency, and cross-image permission bugs (the 2026-07
lock-file failure happened exactly at that boundary).

Content changes beyond concatenation:
- qpdf joins the main apt list; dev's R packages install as rstudio
  (retiring dev's root-install + chmod pattern)
- PKG_SYSREQS=false placed after the root-installed R stacks, before
  all rstudio-user installs, and now applies image-wide at runtime
- requirements.txt/.lock move to the repo root; .dockerignore added
- CLAUDE.md and README rewritten for the one-image architecture

Old GHCR packages (devcontainers/base, /dev, /student) keep their final
tags but receive no new versions.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 7, 2026 16:58
@davidkane9
davidkane9 merged commit d5f9346 into main Jul 7, 2026
1 check passed
@davidkane9
davidkane9 deleted the one-image branch July 7, 2026 16:58

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR consolidates the prior base/dev/student image split into a single root Dockerfile that builds and publishes one GHCR image (ghcr.io/ppbds/devcontainer), simplifying CI, tagging, and consumer configuration while preserving the existing tool stacks and smoke tests.

Changes:

  • Replaces the three per-audience Dockerfiles with one root Dockerfile, moving Python requirements files to the repo root.
  • Simplifies GitHub Actions build/push to a single job targeting ghcr.io/ppbds/devcontainer.
  • Updates repository documentation (README + CLAUDE.md) to reflect the new one-image architecture and rollout/runbook.

Reviewed changes

Copilot reviewed 8 out of 10 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Dockerfile New single-image build that merges base/dev/student layers, installs stacks, and runs smoke tests.
.github/workflows/build.yml Collapses the previous multi-job pipeline into a single build-and-push job for the root image.
requirements.txt New root-level top-pin list for the Python data-science stack.
requirements.lock New root-level uv-compiled lockfile for the Python stack.
.dockerignore Minimizes build context to only the Dockerfile + Python requirements files.
README.md Updates consumption instructions to the new ghcr.io/ppbds/devcontainer image and explains deprecation of old images.
CLAUDE.md Updates architecture/runbook guidance for the single-image approach and associated conventions.
base/Dockerfile Removed (functionality moved into root Dockerfile).
dev/Dockerfile Removed (functionality moved into root Dockerfile).
student/Dockerfile Removed (functionality moved into root Dockerfile).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Dockerfile
Comment on lines +489 to +493
# (c) The course tutorials must be discoverable (catches a broken tutorial pkg).
RUN R --vanilla -e 'ts <- learnr::available_tutorials("tutorial.helpers"); if (!("getting-started" %in% ts$name)) stop("getting-started tutorial not found"); cat("TUTORIALS OK:", paste(ts$name, collapse = ", "), "\n")'
# ─────────────────────────────────────────────────────────────────────────────

# Locale (en_US.UTF-8) and timezone (Etc/UTC) are inherited from the rocker base.
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