build: migrate to hardened/hummingbird base image#466
Conversation
RHCLOUD-48962 Replace ubi9/go-toolset and ubi9-minimal base images with hardened/hummingbird FIPS-compliant images (hi/go:latest-fips-builder + hi/go:latest-fips). Restructure build flow to use /workspace workdir, go mod download for dependency caching, and CGO_ENABLED=1 for FIPS compliance. Remove deprecated go get -d and legacy env vars.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
Summary by CodeRabbit
WalkthroughThe Dockerfile's multi-stage build was reworked: the builder stage now uses a FIPS-compliant base image with a /workspace directory and go mod download caching, the build/test command sequence and binary output paths changed, and the runtime stage uses a new base image with updated artifact paths plus added CMD and EXPOSE directives. ChangesDockerfile Build Rework
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Warning Review ran into problems🔥 ProblemsGit: Failed to clone repository. Please run the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
@coderabbitai full review |
✅ Action performedFull review finished. |
Description
Migrate the Dockerfile to use hardened/hummingbird FIPS-compliant container base images, aligning with the organizational standard already adopted by other RedHatInsights Go services (insights-ingress-go, export-service-go, chrome-service-backend, scheduler).
RHCLOUD-48962
How to test locally
docker build -t quickstarts:test .docker run --rm quickstarts:test --helpAnything reviewers should know?
Key changes:
ubi9/go-toolset:1.26.2→hi/go:latest-fips-builderwithUSER 0,WORKDIR /workspaceubi9-minimal:latest→hi/go:latest-fipsCGO_ENABLED=0toCGO_ENABLED=1(required for FIPS-compliant crypto via BoringSSL)go get -d -vwithgo mod downloadfor dependency caching-ldflags "-w -s"for smaller binariesGO111MODULE=on(default since Go 1.16),GOTOOLCHAIN=go1.26.3(hummingbird manages its own Go toolchain)COPY --from=builderpaths updated from$GOPATHto/workspace/Renovate is already configured and will handle base image tag pinning automatically.
Checklist
AI disclosure
Assisted by: Claude Code (Anthropic)