-
Notifications
You must be signed in to change notification settings - Fork 548
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
Introduce official Docker image #1819
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1819 +/- ##
==========================================
+ Coverage 92.45% 92.57% +0.12%
==========================================
Files 40 42 +2
Lines 11232 11418 +186
==========================================
+ Hits 10384 10570 +186
Misses 686 686
Partials 162 162 ☔ View full report in Codecov by Sentry. |
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.
How about skipping goreleaser builds in Dockerfile? This might simplify things. Thoughts?
Hi @cpunion 👋
I'm open to building directly within the Dockerfile, but baking GoReleaser-generated artifacts into the image ensures they are identical to those from GitHub Releases, which could be beneficial. Building in the Dockerfile may be better suited for debugging, so I've maintained that option. Regarding your mention of "Run failed both on macOS M1 and Ubuntu 22.04 amd64", could you specify the failure point? Was it during |
Okay, that makes sense. Just a small issue, docker always have two different build steps.
In your github action link above (# 8) skiped docker build. But seems your build # 9 success. I can't verify this locally, the full logs are attached below, are there some steps I missing?
Full build log on Ubuntu 22.04 amd64:
|
The error you're seeing is likely due to not having QEMU installed. QEMU is required for building Docker images for different architectures. https://goreleaser.com/cookbooks/multi-platform-docker-images/#other-things-to-pay-attention-to |
Thanks. Build pass in https://github.com/cpunion/gop/actions/runs/8319567514/job/22763054716 . I will test the images later. |
I'm not sure but in case you're referring to multi-stage builds, the purpose is to ensure the final image is as clean and small as possible, which is a common practice.
Are you referring to this step? That's expected. All images are built, but for pre-releases, we only push the full-version image tag. To break it down, for a stable release like |
Oops, my mistake. I meant the Dockerfile has two branches that run different code depending on the built files. And
OK. |
That's a good catch. The build flow is currently determined by the presence of the |
I think it's better for using explicit flags. |
I've just made changes to the PR as discussed, and it's ready for review now. |
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.
Approve.
Fixes #1818
Note that this feature requires the Workflow permissions to be set to
Read and write permissions
.