-
Notifications
You must be signed in to change notification settings - Fork 39
fix: Add CA certificates to Docker image #617
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
WalkthroughUpdated the goreleaser Dockerfile's base image from Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~5 minutes Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
.goreleaser.Dockerfile (1)
1-1: Excellent fix for the CA certificate issue!The switch to
gcr.io/distroless/static:nonrootcorrectly addresses the missing CA certificates problem and improves security by running as non-root. This is the recommended base image for static Go binaries.Consider pinning to a specific digest or versioned tag (e.g.,
gcr.io/distroless/static:nonroot-amd64@sha256:...orgcr.io/distroless/static:nonroot-20240101) for reproducible builds.🔎 Example with digest pinning
-FROM gcr.io/distroless/static:nonroot +FROM gcr.io/distroless/static:nonroot@sha256:<specific-digest>You can find the latest digest at: https://console.cloud.google.com/gcr/images/distroless/global/static
📜 Review details
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
.goreleaser.Dockerfile
🔇 Additional comments (1)
.goreleaser.Dockerfile (1)
2-3: LGTM!The COPY and ENTRYPOINT directives are correctly configured for the static Go binary.
Problem
The current Docker image is built
FROM scratch, which includes no CA certificates. This causes all HTTPS requests to fail with:This happens even against well-known public endpoints like https://example.com, making the CLI unusable for any TLS-enabled OpenFGA deployment when running in Docker.
Solution:
Switch from
scratchtogcr.io/distroless/static:nonroot:Why distroless?
Steps to reproduce
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.