Fixing cross-platform Docker image build issue on Apple Silicon

almirsarajcic

almirsarajcic

Created 6 months ago

If you’re using an Apple Silicon processor and have an issue building a Docker image using --platform linux/amd64 flag, you can fix it by adding the following line to your Dockerfile.

ENV ERL_AFLAGS="+JMsingle true"

It will prevent errors caused by JIT during the mix deps.compile step.

Found the hack here:

Related: https://github.com/3Stones-io/omedis/issues/385.