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

Set GOARM=7 explicitly for arm32v7 images #498

Merged
merged 1 commit into from
Dec 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions 1.21/alpine3.18/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions 1.21/alpine3.19/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions 1.21/bookworm/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions 1.21/bullseye/Dockerfile

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions Dockerfile-linux.template
Original file line number Diff line number Diff line change
Expand Up @@ -193,6 +193,17 @@ RUN set -eux; \
/usr/local/go/src/cmd/dist/dist \
"$GOCACHE" \
; \
{{ if [ "1.20" ] | index(env.version) then "" elif .arches["arm32v7"].url // "" | contains("armv6") then ( -}}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is set only on 1.21+ because that's the first version that ships with go.env (I'm not sure if it was supported earlier, but it definitely didn't have any default contents before 1.21 and supported versions are short-lived enough that I'm not too worried about this only being fixed in 1.21+).

elif [ "$arch" = {{ os_arches["arm32v7"] | @sh }} ]; then \
[ -s /usr/local/go/go.env ]; \
before="$(go env GOARM)"; [ "$before" != {{ .arches["arm32v7"].env["GOARM"] | @sh }} ]; \
{ \
echo; \
echo '# https://github.com/docker-library/golang/issues/494'; \
echo {{ "GOARM=\(.arches["arm32v7"].env["GOARM"])" | @sh }}; \
} >> /usr/local/go/go.env; \
after="$(go env GOARM)"; [ "$after" = {{ .arches["arm32v7"].env["GOARM"] | @sh }} ]; \
{{ ) else "" end -}}
fi; \
\
{{ if is_alpine then ( -}}
Expand Down