-
Notifications
You must be signed in to change notification settings - Fork 2
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
Document Docker build for cross platform images (e.g build on macOS and deploy to amd64) #43
Comments
I came across this issue yesterday, I was building fine and then was unable to this week with the
I tried almost everything that I could find around the web including what has been mentioned in this ticket. I am on an Apple Silicon M2 machine and my deployment targer is Eventually I came across this article Faster Multi-Platform Builds: Dockerfile Cross-Compilation Guide which outlines that I also saw that Eventually this is what worked for me. docker buildx build --platform=linux/amd64,linux/arm64 --push -t "ghcr.io/anomaly/app-server:0.7.0" -f Dockerfile.prod .
Hope this helps someone out there struggling with the same issue. See also M1 mac: docker build allows platform "amd64" but docker run can't find images unless platform is "linux/amd64" where I have left this comment, that issue also references containerd-integration: cannot interact with images that don't have the default platform |
Reopening until this is merged into documentation. |
This Stackoverflow post highlights the use of the docker run -it --entrypoint sh image_name This was very useful when debugging why the labs server image worked in development using |
the path in docker-compose explicitly mounted /src/lab_mock to /opt/lab_mock which would have overwritten what would essentially be a bug in the build step where the files from /src/lab_mock are being copied into /opt/lab_mock/lab_mock failing the uvicorn command to find the files when the image is built and pushed to the github repository we should maintain this image constantly so we can test these simple use cases this also follows some docker build issues we have had in the past, while these commands have been documented into tickets anomaly/lab-python-server#43 we should make them part of the build process and Taskfile
At Anomaly we primarily use
macOS
for development and as Apple moves to Apple Silicon the development environments are moving toarm
based CPUs, but most of our deployments are still underamd64
(Intel or AMD based CPUs).This has caused issues in the past, this should be documented properly and possibly even be made into a
Task
endpointThe text was updated successfully, but these errors were encountered: