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 multi-platform Docker image #1022

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

ftkg
Copy link
Contributor

@ftkg ftkg commented May 10, 2023

Adds multi-platform support for amd64 and arm64 by cross-compiling inside the Dockerfile to both architectures.

@ftkg
Copy link
Contributor Author

ftkg commented May 10, 2023

Quick steps:

  1. Install Docker Desktop.
  2. docker buildx create --name mybuilder --driver docker-container --bootstrap --use
  3. On nakama/build folder, build, tag and push in a single command:
    docker buildx build "$PWD" --platform linux/amd64,linux/arm64 --file ./Dockerfile --build-arg commit="$(git rev-parse --short HEAD 2>/dev/null)" --build-arg version=2.1.0 -t heroiclabs/nakama:2.1.0 -t heroiclabs/nakama:latest --push

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.

None yet

1 participant