Skip to content

fix(examples): pull gin base images from ECR Public mirror#752

Merged
bnusunny merged 2 commits into
aws:mainfrom
JamBalaya56562:fix/gin-ecr-public
Jun 3, 2026
Merged

fix(examples): pull gin base images from ECR Public mirror#752
bnusunny merged 2 commits into
aws:mainfrom
JamBalaya56562:fix/gin-ecr-public

Conversation

@JamBalaya56562
Copy link
Copy Markdown
Contributor

Problem

The test-image (gin) CI job (Verify Examples) was failing at the Build step (sam build) with Docker Hub connection timeouts:

Step 1/13 : FROM golang:1.18-alpine AS build_base
Get "https://registry-1.docker.io/v2/": net/http: request canceled (Client.Timeout exceeded)
...
Get "https://registry-1.docker.io/v2/": context deadline exceeded

All 5 backoff retries were exhausted by unreachable registry-1.docker.io, so the job exited 1.

Root cause

examples/gin/app/Dockerfile was 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-alpinepublic.ecr.aws/docker/library/golang:1.23-alpine
  • alpine:3.9public.ecr.aws/docker/library/alpine:3.20

This aligns gin with all other examples and bumps the stale base image versions. go.mod declares go 1.18, so golang 1.23 builds it with backward compatibility.

Verification

  • Local docker build of examples/gin/app succeeds, pulling base images via public.ecr.aws (no Docker Hub access).
  • Ran the Verify Examples workflow on this branch via workflow_dispatch: all jobs green, including test-image (gin) passing in ~1m8s (previously failed after 5min of retries).

🤖 Generated with Claude Code

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 bnusunny requested a review from a team as a code owner June 3, 2026 18:10
@bnusunny bnusunny merged commit c7f2899 into aws:main Jun 3, 2026
21 checks passed
@JamBalaya56562 JamBalaya56562 deleted the fix/gin-ecr-public branch June 3, 2026 23:41
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