Skip to content

ci: pull the Debian base images from this repository's registry - #144

Merged
heyJordanParker merged 3 commits into
masterfrom
fix/ci-base-image
Oct 16, 2026
Merged

heyJordanParker merged 3 commits into
masterfrom
fix/ci-base-image

Conversation

@heyJordanParker

@heyJordanParker heyJordanParker commented Oct 16, 2026 •

Copy link
Copy Markdown
Owner

Problem

The LINUX job builds sharp/docker's image FROM public.ecr.aws/docker/library/debian:trixie, pulled anonymously. GitHub's shared runners exhaust ECR Public's anonymous quota, so #135's and #143's LINUX jobs died in sharp/bin/build --linux with 429 Too Many Requests - Server message: toomanyrequests: Data limit exceeded. Docker Hub failed the same way on 2026-10-09, which is why the images moved to ECR Public. Every PR is exposed, and a rerun is a coin flip.

Solution

  • base-images.yml (new) copies debian:trixie and debian:trixie-slim to ghcr.io/heyjordanparker/debian every day, with every platform. It is the one job that reads the public registry, and a failed copy leaves the previous day's images for every build.
  • Both Dockerfiles take the base image as the build argument BASE_IMAGE, whose default is the public registry's image. A local build keeps that default and needs no login, so it doesn't depend on the GHCR package being public.
  • sharp/docker/run passes BASE_IMAGE from the environment. Docker leaves an unset one out.
  • The LINUX job sets BASE_IMAGE to the GHCR copy, logs in to ghcr.io with its GITHUB_TOKEN, and pulls the image in its own step, so its log names the source.
  • The IMAGE job passes the trixie-slim copy as a build argument. It already logs in to ghcr.io to push the release image.
  • The copy keeps the tag, not a digest, so the images still take Debian's security updates, as f80c7f4 decided.
.github/workflows/
├── base-images.yml      <- new: the daily copy
└── sharp.yml            <- LINUX sets BASE_IMAGE and pulls it; IMAGE passes it
sharp/docker/
├── Dockerfile           <- ARG BASE_IMAGE, default public.ecr.aws/docker/library/debian:trixie
├── run                  <- docker build --build-arg BASE_IMAGE
└── runtime/Dockerfile   <- ARG BASE_IMAGE, default public.ecr.aws/docker/library/debian:trixie-slim

Verification

  • base-images.yml runs on this PR, because the PR changes it, and copies both tags.
  • The LINUX job's log shows docker pull ghcr.io/heyjordanparker/debian:trixie.
  • Locally, with BASE_IMAGE unset, docker build --build-arg BASE_IMAGE resolved public.ecr.aws/docker/library/debian:trixie. With it set, the build resolved ghcr.io/heyjordanparker/debian:trixie-slim@sha256:a29215f6…, the same index digest ECR Public serves.

Problem:
The LINUX job builds sharp/docker's image FROM
public.ecr.aws/docker/library/debian:trixie, pulled anonymously. GitHub's
shared runners exhaust ECR Public's anonymous quota: #135's and #143's
LINUX jobs died with "429 Too Many Requests: Data limit exceeded". Docker
Hub failed the same way on 2026-10-09, which is why the images moved to
ECR Public. Every PR is exposed, and a rerun is a coin flip.

Solution:
- base-images.yml copies debian:trixie and debian:trixie-slim from ECR
  Public to ghcr.io/heyjordanparker/debian every day, with every platform.
  It is the one job that reads the public registry, and a failed copy
  leaves the previous day's images.
- Both Dockerfiles start FROM the copies. The daily copy keeps the tag,
  not a digest, so the images still take Debian's security updates, as
  f80c7f4 decided.
- The LINUX job logs in to ghcr.io with its GITHUB_TOKEN and pulls the
  base image in its own step, so its log names the source.
- The IMAGE job already logs in to ghcr.io to push the release image.

.github/workflows/
├── base-images.yml      <- new: the daily copy
└── sharp.yml            <- LINUX logs in to ghcr.io and pulls the base image
sharp/docker/
├── Dockerfile           <- FROM ghcr.io/heyjordanparker/debian:trixie
└── runtime/Dockerfile   <- both stages FROM ghcr.io/heyjordanparker/debian:trixie-slim
…gument

Problem:
Both Dockerfiles started FROM ghcr.io/heyjordanparker/debian, so a local
build pulled from that package without a login. That works only while the
package is public, a setting GitHub's API can't change.

Solution:
- Both Dockerfiles take the base image as the build argument BASE_IMAGE,
  whose default is the public registry's image, as before this branch.
- sharp/docker/run passes BASE_IMAGE from the environment, and docker
  leaves it out when it is unset, so a local build keeps the default.
- The LINUX job sets BASE_IMAGE to the ghcr.io copy, and the IMAGE job
  passes it as a build argument, so no CI build pulls anonymously.

.github/workflows/
├── base-images.yml      <- its header says CI alone uses the copy
└── sharp.yml            <- LINUX sets BASE_IMAGE; IMAGE passes it
sharp/docker/
├── Dockerfile           <- ARG BASE_IMAGE, default public.ecr.aws/docker/library/debian:trixie
├── run                  <- docker build --build-arg BASE_IMAGE
└── runtime/Dockerfile   <- ARG BASE_IMAGE, default public.ecr.aws/docker/library/debian:trixie-slim
…e that answers

Problem:
The first copy of debian:trixie failed: ECR Public answered
"toomanyrequests: Data limit exceeded" to all five of skopeo's tries, as
it did to the LINUX jobs. A copy that reads only ECR Public is exposed to
the same quota it exists to avoid.

Solution:
The copy tries mirror.gcr.io, Google's cache of Docker Hub, then ECR
Public, then Docker Hub, and stops at the first that gives the image. On
2026-10-16 mirror.gcr.io served debian:trixie and debian:trixie-slim
under the same index digests as ECR Public, sha256:913f6706… and
sha256:a29215f6…, so every source gives the same copy.

.github/workflows/
└── base-images.yml      <- three sources, in order
@heyJordanParker
heyJordanParker merged commit d31140d into master Oct 16, 2026
21 checks passed
heyJordanParker added a commit that referenced this pull request Oct 16, 2026
Master gained #144, CI's base images, and #147, sharp/bin/spec writing
each type of an example to a file of its own. SPEC_GUARD compares this
branch with master's tip, so it read master's sharp/bin/spec change as
this branch's.
heyJordanParker added a commit that referenced this pull request Oct 16, 2026
Problem

#145 was behind master, which gained #142, #143, #144, #146 to #150.
Both sides changed the default names: this branch generates them from
the standard library into `SHARP_CLASSES`, and #143 added `Result` to a
hand-written list and made `Error` a default name nothing shadows.

Solution

One mechanism: `default_classes()` stays `NAMED_EFFECTS` plus the
generated `SHARP_CLASSES`, regenerated from the merged library, which now
holds `Sharp\Error` and `Sharp\Result`. #143's `fixed_default_class`
stays, and `default_classes()` leaves out the class it fixes, so `Error`
is never shadowable while `Result` is.

sharp/mago/crates/names/src/
├── lib.rs                 default_classes and fixed_default_class
├── sharp_classes.rs       regenerated: Error and Result join
└── internal/walker.rs     both imports kept
docs/architecture/slices/23-names-imports.md   Error is the one fixed default name
@heyJordanParker
heyJordanParker deleted the fix/ci-base-image branch November 3, 2026 22:08
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