mountebank icon indicating copy to clipboard operation
mountebank copied to clipboard

Add Apple Silicon (M1) build for Docker Image

Open erakli opened this issue 4 years ago • 3 comments

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!

erakli avatar Sep 27 '21 11:09 erakli

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.

bbyars avatar Mar 15 '22 17:03 bbyars

Yes @bbyars, I think the FROM directive should be:

FROM arm64v8/node:14-alpine

Kwadz avatar Mar 30 '22 13:03 Kwadz

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.

ezienecker avatar Aug 05 '22 19:08 ezienecker