Skip to content

Update docker build command for syncserver#4562

Open
CYPHER0041 wants to merge 3 commits intoankitects:mainfrom
CYPHER0041:feat-syncserver-build-all-plaforms
Open

Update docker build command for syncserver#4562
CYPHER0041 wants to merge 3 commits intoankitects:mainfrom
CYPHER0041:feat-syncserver-build-all-plaforms

Conversation

@CYPHER0041
Copy link

The command for building the image does not include the --platform flag which prevents the image from running across all architectures. For example, if I build the image on an ARM system and then try running on x86, it won’t work.

This issue can be fixed by using docker buildx and adding the flag to include all of the platforms. I have tested this by building the image with the linux/arm64 and linux/amd64 platform flags on an ARM system and then running a container with that image on an x86 system.

This would be useful in scenarios where the syncserver runs on devices that cannot do builds.

The correct command would be

# Builds for all existing platforms supported by Docker
docker buildx build -f <Dockerfile> --platform linux/amd64,linux/arm64,windows/amd64 --no-cache --build-arg ANKI_VERSION=<version> -t anki-sync-server .

Reference: https://docs.docker.com/build/building/multi-platform/

@CYPHER0041 CYPHER0041 marked this pull request as draft February 16, 2026 09:16
@CYPHER0041 CYPHER0041 marked this pull request as ready for review February 16, 2026 10:32
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.

1 participant