-
Notifications
You must be signed in to change notification settings - Fork 0
feat(docker): Add multi-stage Dockerfile for Go development environment #3
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
Conversation
WalkthroughIntroduces a new multi-stage Dockerfile for building a Go development environment. Stage 1 downloads a Go tarball from go.dev using a configurable SDK_VERSION (default 1.25.4), and Stage 2 extracts it into a configurable installation root (default /usr/local) with PATH updated to include the Go binaries. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes
Possibly related PRs
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✨ Finishing touches🧪 Generate unit tests (beta)
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: 3
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
images/golang/Dockerfile(1 hunks)
🧰 Additional context used
🪛 Checkov (3.2.334)
images/golang/Dockerfile
[low] 6-6: Ensure that COPY is used instead of ADD in Dockerfiles
(CKV_DOCKER_4)
[low] 1-1: Ensure the base image uses a non latest version tag
(CKV_DOCKER_7)
[low] 1-15: Ensure that HEALTHCHECK instructions have been added to container images
(CKV_DOCKER_2)
[low] 1-15: Ensure that a user for the container has been created
(CKV_DOCKER_3)
🪛 Hadolint (2.14.0)
images/golang/Dockerfile
[warning] 1-1: Using latest is prone to errors if the image will ever update. Pin the version explicitly to a release tag
(DL3007)
[warning] 9-9: Using latest is prone to errors if the image will ever update. Pin the version explicitly to a release tag
(DL3007)
🔇 Additional comments (1)
images/golang/Dockerfile (1)
6-6:ADDfor remote URLs is the correct choice here (not an issue).Checkov recommends using
COPYinstead ofADD, butCOPYcannot download remote files. Since you're fetching from an external URL (https://go.dev/dl/go${SDK_VERSION}.linux-amd64.tar.gz),ADDis the appropriate choice. No changes needed.
Summary by CodeRabbit
Quick Notes
Title: Set the PR title to
@coderabbitaito have the bot generate one for you.Review: The bot reviews PRs by default. To opt out, add the
no bot reviewerlabel.