Skip to content
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

Dockerfile: use musl variant for go build image #43

Merged
merged 1 commit into from
Jan 7, 2023
Merged

Conversation

willnorris
Copy link
Member

Most of the details are in chainguard-images/images#182. At the end of last year, Chainguard switched from alpine+musl to wolfi+glibc as their default for their go images. These new images are only built for linux/amd64 and linux/arm64. We'd build for linux/arm/v7 as well in order to support older raspberry pis, which is only available in the musl images.

Fixes #42

@willnorris
Copy link
Member Author

willnorris commented Jan 7, 2023

It's worth noting also that I don't think this should really be necessary long term. Because Go has such good cross-compilation support, we should be able to build an arm/v7 binary on an amd64 or arm64 build image. I'll just have to figure out how to configure the build step to make sure those all get tagged properly and such.

This post has more details: https://www.docker.com/blog/faster-multi-platform-builds-dockerfile-cross-compilation-guide/

@willnorris willnorris merged commit ef7f8b2 into main Jan 7, 2023
@willnorris willnorris deleted the will/arm7 branch January 7, 2023 18:42
willnorris added a commit that referenced this pull request Jan 10, 2023
Use a build image built for the native architecture so that it doesn't
run in emulation mode.

Switch to Chainguard's wolfi/glibc build image. This limits our build
architectures to just amd64 and arm64, but that is sufficient for our
needs.

Updates #42
Updates #43
willnorris added a commit that referenced this pull request Jan 10, 2023
Use a build image built for the native architecture so that it doesn't
run in emulation mode.

Switch to Chainguard's wolfi/glibc build image. This limits our build
architectures to just amd64 and arm64, but that is sufficient for our
needs.

Updates #42
Updates #43

Signed-off-by: Will Norris <[email protected]>
willnorris added a commit that referenced this pull request Jan 10, 2023
Use a build image built for the native architecture so that it doesn't
run in emulation mode.

Switch to Chainguard's wolfi/glibc build image. This limits our build
architectures to just amd64 and arm64, but that is sufficient for our
needs.

Updates #42
Updates #43

Signed-off-by: Will Norris <[email protected]>
willnorris added a commit that referenced this pull request Jan 10, 2023
Use a build image built for the native architecture so that it doesn't
run in emulation mode.

Switch to Chainguard's wolfi/glibc build image. This limits our build
architectures to just amd64 and arm64, but that is sufficient for our
needs.

Updates #42
Updates #43

Signed-off-by: Will Norris <[email protected]>
willnorris added a commit that referenced this pull request Jan 10, 2023
Use a build image built for the native architecture so that it doesn't
run in emulation mode.

Switch to Chainguard's wolfi/glibc build image. This limits our build
architectures to just amd64 and arm64, but that is sufficient for our
needs.

Updates #42
Updates #43

Signed-off-by: Will Norris <[email protected]>
willnorris added a commit that referenced this pull request Jan 10, 2023
Use a build image built for the native architecture so that it doesn't
run in emulation mode.

Switch to Chainguard's wolfi/glibc build image. This limits our build
architectures to just amd64 and arm64, but that is sufficient for our
needs.

Updates #42
Updates #43

Signed-off-by: Will Norris <[email protected]>
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.

docker builds are failing to build linux/arm/v7 images
2 participants