Running amd64 Docker Container with Mac M1-Chip ( arm64)

Since i switched my Laptop towards a new Mac Book Pro which is running with the newly created M1 Chip, Docker Container are not able to find mandatory packages anymore. The Problem might be the M1 Chip for which an CPU architecture was reinvented and is based on arm64. Is it necessary to refactor and rebuild all the images that were created before this setup change ? Or is there another way on how to solve this issue ?
1 answer

Apple was reusing this already known architecture of CPUS to increase the performance. This chip does not only use a simple ARM chip it self but the main idea is based on it.
However, since rosetta 2 is a very strong and helpful tool which was delivered directly from apple to takle such problems, you should use it. The drastically change in the already settled architecture world was carefully considered and planed by apple.
To come back towards your question, it is not necessary to rebuild and factor all the images. Rosetta will help you keep your images and containers on Track. Since Rosetta2 is able to virtually calculate and imitate all other systems you can set the following environment variable:

export DOCKER_DEFAULT_PLATFORM=linux/amd64

Afterwards your AMD64 Container will start as normal on the Apple M1 System, hence the performance is slightly decreasing.

Comments

Interesting! I'm using the same computer but didn't get these kinds of problems when running amd64 Docker Container

Mathilda Moström - Thu, 12/16/2021 - 10:19 :::