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

Build arm64 docker image get error #1138

Closed
3 tasks
xinatcg opened this issue Nov 12, 2023 · 2 comments
Closed
3 tasks

Build arm64 docker image get error #1138

xinatcg opened this issue Nov 12, 2023 · 2 comments

Comments

@xinatcg
Copy link
Contributor

xinatcg commented Nov 12, 2023

Before you submit an issue we recommend you drop into the community forum and ask any questions you have or mention any problems you've had getting started with the server.

Please provide as much information as you can with this issue report. If you believe it may be an issue with one of the client libraries please report it on their own trackers.

Description

Build arm64 docker image get error

docker build "$PWD" --platform "linux/arm64" --file ./Dockerfile.arm64 --build-arg commit="$(git rev-parse --short HEAD 2>/dev/null)" --build-arg version=3.19.0 -t local/nakama:3.19.0

error:

8.692 gcc: error: unrecognized command-line option '-m64'

full

 => ERROR [builder 4/4] RUN git checkout --quiet "7d5051fb" &&     go build -o /go/build-out/nakama -trimpath -mod=vendor -gcflags "-trimpath $PWD" -asmflags "-trimpath $PWD" -ldflags "-s -w -X   34.1s
------
 > [builder 4/4] RUN git checkout --quiet "7d5051fb" &&     go build -o /go/build-out/nakama -trimpath -mod=vendor -gcflags "-trimpath $PWD" -asmflags "-trimpath $PWD" -ldflags "-s -w -X main.version=3.19.0 -X main.commitID=7d5051fb":
8.692 # runtime/cgo
8.692 gcc: error: unrecognized command-line option '-m64'
------
Dockerfile.arm64:34
--------------------
  33 |     WORKDIR /go/build/nakama
  34 | >>> RUN git checkout --quiet "$commit" && \
  35 | >>>     go build -o /go/build-out/nakama -trimpath -mod=vendor -gcflags "-trimpath $PWD" -asmflags "-trimpath $PWD" -ldflags "-s -w -X main.version=$version -X main.commitID=$commit"
  36 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c git checkout --quiet \"$commit\" &&     go build -o /go/build-out/nakama -trimpath -mod=vendor -gcflags \"-trimpath $PWD\" -asmflags \"-trimpath $PWD\" -ldflags \"-s -w -X main.version=$version -X main.commitID=$commit\"" did not complete successfully: exit code: 1

Steps to Reproduce

Expected Result

Actual Result

Context

  • Unity
  • Unreal
  • Other

Your Environment

  • Nakama: X.X.X
  • Database: X.X.X
  • Environment name and version:
  • Operating System and version:
@zyro
Copy link
Member

zyro commented Nov 12, 2023

Fixed in ac9226d. Note it is usually not recommended to build from source or build your own docker images, use existing binaries and images where possible.

@zyro zyro closed this as completed Nov 12, 2023
@xinatcg
Copy link
Contributor Author

xinatcg commented Nov 13, 2023

Fixed in ac9226d. Note it is usually not recommended to build from source or build your own docker images, use existing binaries and images where possible.

But there is not arm64 official docker image right?

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

No branches or pull requests

2 participants