-
Notifications
You must be signed in to change notification settings - Fork 42
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
Added M1 support to docker files #351
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you should also make a note in top-level README.md regarding how to use your script if dev needs to compile on m1 chip.
ok tested, all the build commands work on my machine |
@mallochine Could you pls check again after the fix |
@mallochine ready for review |
@mallochine Anything else from my side to push this PR? |
* master: (23 commits) 🐛 writePoolLock creats a new wrteipool if non exists (#383) ✨ Add immutable allocations (#375) ✨ Select diverse blobbers by geo location (#315) ✨ Blobber block rewards (#317) 📚 Unit test doc (#325) ✨ Free storage allocation (#358) Fixes for smart contract blobber add/update methods (#361) ✨ Add curator and transfer allocatin ownership (#366) read pool lock creat read pool (#377) add condition check to handle empty block hash #297 Update state_handler_test.go Update state_handler_test.go Update handler.go Bug in Shell Scripts (#373) Return empty list, if there is no challenges fixing issue that caused build fail more shell corrections Added M1 support to docker files (#351) updated shell files according to shellchecks (github.com/koalaman/shellcheck) readme fixes ...
Fixing docker builds of AMD/Intel on Apple M1 chips
You can use buildkit, and then:
docker buildx build --platform linux/amd64 .
or change Dockerfile definition with
FROM --platform=linux/amd64 golang:1.12.4-alpine3.9
Testing
Following scripts support flags: m1, -m1, --m1
Prerequisites:
https://docs.docker.com/docker-for-mac/apple-silicon
Other links:
https://docs.docker.com/buildx/working-with-buildx
https://docs.docker.com/engine/reference/commandline/buildx