Add Apple Silicon (M1) build for Docker Image
Hello!
First of all, thank you for this great project! I'm using mountebank in my project for testing and it works great.
For local development I'm using MacBook Air M1, so I need to build mountebank image for ARM manually. While I'm okay with that, I suppose that there would be more devs with M1 and it should be very easy to add new tag to this script.
Neither of the most downloadable images are not supporting ARM:
- https://hub.docker.com/r/bbyars/mountebank/tags (yours)
- https://hub.docker.com/r/andyrbell/mountebank/tags
- https://hub.docker.com/r/jkris/mountebank/tags
So, it would be nice to add new tag.
If you have no time to do it, I might help with this! The only thing I need, your guide about build system, so I know, where to make changes.
Thank you!
Hi there, Sorry for not responding earlier. I don't own an ARM processor. Does the Dockerfile need a different FROM directive? If you don't mind sharing the solution, either in here or through a PR, I'm more than happy to make sure it works with the build system.
Yes @bbyars, I think the FROM directive should be:
FROM arm64v8/node:14-alpine
You do not need to specify multiple From Images. Under the hood, Docker chooses the correct image for the target platform, if available. Furthermore, Docker offers buildx, which allows you to easily create a multi-auch image. See my MR for that.
https://github.com/bbyars/mountebank/pull/692
@bbyars It would be nice if the PR could be merged into the project soon because we are using Mountebank in our projects. Thanks in advance.