fix(examples): pull gin base images from ECR Public mirror#752
Merged
Conversation
The gin example was the only one still pulling its base images (golang:1.18-alpine, alpine:3.9) directly from Docker Hub, which caused the test-image (gin) CI job to fail with registry-1.docker.io connection timeouts (Docker Hub anonymous pull rate limits). Switch both stages to the public.ecr.aws/docker/library mirror to match every other example, and bump to golang:1.23-alpine / alpine:3.20. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
bnusunny
approved these changes
Jun 3, 2026
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.
Problem
The
test-image (gin)CI job (Verify Examples) was failing at the Build step (sam build) with Docker Hub connection timeouts:All 5 backoff retries were exhausted by unreachable
registry-1.docker.io, so the job exited 1.Root cause
examples/gin/app/Dockerfilewas the only example still pulling its base images directly from Docker Hub (golang:1.18-alpine,alpine:3.9). Every other example already uses the ECR Public mirror (public.ecr.aws/docker/library/...). Anonymous Docker Hub pulls from GitHub Actions runners are rate-limited / flaky, which caused the failure.The
test-zip (gin-zip)job passed because the zip variant does not build the Docker image and thus never pulls from Docker Hub — consistent with the failure being Docker Hub-specific.Change
examples/gin/app/Dockerfile:golang:1.18-alpine→public.ecr.aws/docker/library/golang:1.23-alpinealpine:3.9→public.ecr.aws/docker/library/alpine:3.20This aligns gin with all other examples and bumps the stale base image versions.
go.moddeclaresgo 1.18, so golang 1.23 builds it with backward compatibility.Verification
docker buildofexamples/gin/appsucceeds, pulling base images viapublic.ecr.aws(no Docker Hub access).workflow_dispatch: all jobs green, includingtest-image (gin)passing in ~1m8s (previously failed after 5min of retries).🤖 Generated with Claude Code