Skip to content

chore: migrate base images to Chainguard - #1

Open
sachin-spotdraft wants to merge 1 commit into
masterfrom
chore/chainguard-base-images
Open

chore: migrate base images to Chainguard#1
sachin-spotdraft wants to merge 1 commit into
masterfrom
chore/chainguard-base-images

Conversation

@sachin-spotdraft

@sachin-spotdraft sachin-spotdraft commented Aug 5, 2026

Copy link
Copy Markdown

User description

Summary

  • Replaces public Docker base images with Chainguard equivalents from cgr.dev/spotdraft.com
  • FIPS variants used where available
  • Build stages: :latest-dev (includes shell)
  • Runtime stages: :latest (minimal, no shell)
  • Platform pinned to linux/amd64

Images updated

See Dockerfile diffs above.

🤖 Generated by chainguard-migrate.sh


Generated description

Below is a concise technical summary of the changes proposed in this PR:
Migrate the Go builder stage from the public Alpine-based image to Chainguard’s cgr.dev/spotdraft.com/go:1.11.10-dev image. Pin the build platform to linux/amd64 while retaining the shell-enabled development image needed for compilation.

Latest Contributors(2)
UserCommitDate
sachin.rathod@spotdraf...chore: migrate base im...August 05, 2026
jh@fullstory.comadd Dockerfile (fullstorydev#43)July 04, 2019
Review this PR on Baz | Customize your next review

Replace public base images with Chainguard equivalents from cgr.dev/spotdraft.com.
- Uses -fips variants where available
- Build stages use :latest-dev (shell available)
- Runtime stages use :latest (minimal)
- Platform pinned to linux/amd64
Comment thread Dockerfile
@@ -1,4 +1,4 @@
FROM golang:1.11.10-alpine as builder
FROM --platform=linux/amd64 cgr.dev/spotdraft.com/go:1.11.10-dev as builder

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The new cgr.dev/spotdraft.com/go:1.11.10-dev image runs as non-root (UID 65532) by default, so the apk update && apk add ... step fails, which blocks the later addgroup/adduser and go build -o /grpcui steps — should we add USER root before this setup and switch back afterward, or use an image whose default user is root?

Severity web_search

Want Baz to fix this for you? Activate Fixer

Fix in Cursor

Prompt for AI Agents
Before applying, verify this suggestion against the current code. In Dockerfile around
lines 1-4 (builder stage), the base image was changed to
`cgr.dev/spotdraft.com/go:1.11.10-dev` whose default user is nonroot (UID 65532), but
the Dockerfile runs `apk update && apk add ...` and `addgroup`/`adduser` before any
`USER root`, so package installation fails and the later steps (creating users/groups,
copying /etc/ssl/certs/ca-certificates.crt and /etc/passwd into the scratch stage, and
`go build -o /grpcui`) never run. Add `USER root` immediately before the first `apk`
command, then switch back to the nonroot user after setup is complete (before `go build`
and any runtime setup), ensuring the scratch-copy steps still occur correctly.
Alternatively, if you prefer not to add user switching, replace the base image with one
whose default user is root.

@sachin-spotdraft

Copy link
Copy Markdown
Author

⚠️ The following image tags are not yet available in our Chainguard catalog / AR — manual review needed:

  • cgr.dev/spotdraft.com/go:1.11.10-dev

These Dockerfile lines were left unchanged.

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