Repository navigation
ci: pull the Debian base images from ECR Public, pinned by digest - #85
Merged
Merged
Conversation
Problem: Both php-sharp images start FROM a Debian image on Docker Hub, pulled anonymously. Docker Hub rate-limits anonymous pulls. On 2026-10-09 the pull of debian:trixie failed with 429 and then 504, and that failed the LINUX job on PR #82 and on another branch in the same window. The IMAGE job, which publishes ghcr.io/heyjordanparker/php-sharp on a v* tag, pulls debian:trixie-slim the same way, so a release can fail the same way. Solution: - Each FROM names the same Docker official image through ECR Public's mirror, public.ecr.aws/docker/library, which has no anonymous rate limit. - Each reference is pinned to the multi-arch index digest, so amd64 and arm64 resolve to the same image on both registries. On 2026-10-10 ECR Public and Docker Hub served the same index digests: debian:trixie sha256:913f6706df59a68922d1dd08f78c2476560a8d367897200a6005b00e5f67c2d5 debian:trixie-slim sha256:a29215f6a35e51e22adffa17f89e9d2ef06214e64a2bad10d765c46aea49f11f sharp/docker/ ├── Dockerfile <- FROM public.ecr.aws/docker/library/debian:trixie@sha256:913f…c2d5 └── runtime/Dockerfile <- both stages FROM public.ecr.aws/docker/library/debian:trixie-slim@sha256:a292…f11f
…y updates Problem: The three FROM lines pinned ECR Public's Debian images by digest. php-sharp has no Dependabot or Renovate, so nothing would ever move those pins. The release image would keep the base's libc and openssl from the day of the pin, because apt-get install adds packages and does not upgrade the ones the base already has. Solution: - Each FROM names the ECR Public tag without a digest: debian:trixie for the dev image, debian:trixie-slim for both stages of the release image. Every build takes the tag's current image, which Debian rebuilds with its security updates. - The images still come from public.ecr.aws/docker/library, so Docker Hub's anonymous pull limit still does not apply. sharp/docker/ ├── Dockerfile <- FROM public.ecr.aws/docker/library/debian:trixie └── runtime/Dockerfile <- both stages FROM public.ecr.aws/docker/library/debian:trixie-slim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
php-sharp's LINUX job and the release image pulled
debian:trixieanddebian:trixie-slimanonymously from Docker Hub. On 2026-10-09 Docker Hub answered 429 and then 504, and that failed LINUX on #82 and on another branch in the same window. The release image (IMAGE, onv*tags) pulls the same way.Change (2 files, +3/−3)
ECR Public mirrors Docker Hub's official images and has no anonymous pull limit. On 2026-10-10,
docker buildx imagetools inspectshowed the same multi-arch index digests on both registries, and the amd64 and arm64 manifests inside them match too.Every other image reference
php-sharp-linuxtag thatsharp/docker/runbuilds.test-suite.yml(its callerTestis disabled),.circleci, andbenchmark/docker-compose.yml.ext/opcache/jit/Dockerfile.arm64.example.Remaining Docker Hub pull, not changeable here
The IMAGE job's reusable
docker/github-buildersetsBUILDKIT_IMAGE: moby/buildkit:v0.32.2in its own workflow env. It exposes no input to override that, and it pulls BuildKit before any login step.moby/buildkitisn't an official image, so ECR Public doesn't mirror it. That leaves one anonymous pull per runner, onv*tags only. Removing it would mean replacingdocker/github-builderwith our own buildx jobs.Proof
sharp/docker/run's own build): it pulledpublic.ecr.aws/docker/library/debian:trixie@sha256:913f…and runs Debian 13.7.docker-containerbuilder, as IMAGE uses): it pulledpublic.ecr.aws/docker/library/debian:trixie-slim@sha256:a292…and built.php --ri sharpprintsVersion => 0.3.0andMago commit => 58c7c4a18….