I want to create dockerfile to install node and mongodb on top of alpine. How will the dockerfile differ for x86, armv7 32 and arm 64
Although the M1 version docker desktop allows users to run x86 docker images under emulation, it will be a more efficient solution to offer your software as a “universal” Multi-Arch docker image that can serve both your ARM (M1) and x86 users.
We now have a single command to create the Docker image with multi-architecture support for the hello world PHP application for amd64, arm64, and arm32, and to store the image in Docker Hub.
Setting Up ARM Emulation on x86It allows users to to build ARM CUDA binaries on your x86 machine without needing a cross compiler. The installation was successful, the emulation is working. At this point, we can now run aarch64 programs on the host x86_64 workstation.
Docker images can support multiple platforms, which means that a single image may contain variants for different architectures, and sometimes for different operating systems, such as Windows. When running an image with multi-platform support, docker automatically selects the image that matches your OS and architecture.
Every Dockerfile
starts with a
FROM <base_image>
declaration, so you will have to choose a base image that will be able to run on your system/architecture and build on top of it.
From here:
Docker Official Images
See Docker's documentation for a good high-level overview of the program.
Architectures other than amd64?
Some images have been ported for other architectures, and many of these are officially supported (to various degrees).
- Architectures officially supported by Docker, Inc. for running Docker: (see download.docker.com) - IBM z Systems (
s390x
): https://hub.docker.com/u/s390x/ - ARMv7 32-bit (arm32v7
): https://hub.docker.com/u/arm32v7/ - Windows x86-64 (windows-amd64
): https://hub.docker.com/u/winamd64/ - Linux x86-64 (amd64
): https://hub.docker.com/u/amd64/
ppc64le
): https://hub.docker.com/u/ppc64le/
i386
): https://hub.docker.com/u/i386/
arm64v8
): https://hub.docker.com/u/arm64v8/
arm32v6
): https://hub.docker.com/u/arm32v6/ (Raspberry Pi 1, Raspberry Pi Zero)arm32v5
): https://hub.docker.com/u/arm32v5/
Dockerfile
. For example for Node.js on arm64v8 see the Dockerfiles here
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With