Part 7: Multi-Container apps: Cannot run MySQL container in arm64 arquitecture
See original GitHub issueHi, I’m trying to run the command
docker run -d \ --network todo-app --network-alias mysql \ -v todo-mysql-data:/var/lib/mysql \ -e MYSQL_ROOT_PASSWORD=secret \ -e MYSQL_DATABASE=todos \ mysql:5.7
But it fails with:
docker: no matching manifest for linux/arm64/v8 in the manifest list entries.
I am using a MacBook Pro M1, Big Sur 11.3.
I understand the issue is with the MySQL image, not supporting the arm64 arquitecture, but it would be good for the tutorial to have at least a workaround for people using arm64 machines. Thank you
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Multi container apps - Docker Documentation
Start a new container using the nicolaka/netshoot image. Make sure to connect it to the same network. $ docker run -it --network todo-app...
Read more >Create multi-container apps with MySQL & Docker Compose
In this tutorial, learn how to create multi-container apps with MySQL and Docker Compose. Use multiple containers to scale your project.
Read more >Docker (Apple Silicon/M1 Preview) MySQL "no matching ...
I got the same error ("no matching manifest for linux/arm64/v8 in the manifest list entries") as the OP. I also tried setting the...
Read more >Building, running, and managing containers
However, they are especially suited to run directly on Red Hat Enterprise Linux, in single-node use cases. For a multi-node container platform, see...
Read more >Installing and Using MariaDB via Docker
Creating and managing a MariaDB Docker container. ... Cannot connect to the Docker daemon at unix:/var/run/docker.sock. Is the docker daemon running?
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I managed to solve it by simply passing the flag
--platform linux/amd64
.Would be nice though if this info was in the tutorial
Hi all, for me the simplest solution was to replace Mysql with mariadb, which is also available for ARM64. Since mariadb is an API-preserving fork of Mysql which even can cope with MYSQL environment variables, no changes have to be made to the App code. Merely, “mysql” has to be replaced by “mariadb” in the docker run commands for the database container
docker run -d \ --network todo-app --network-alias mariadb \ -v todo-mariadb-data:/var/lib/mysql \ -e MYSQL_ROOT_PASSWORD=secret \ -e MYSQL_DATABASE=todos \ mariadb
anddocker run -dp 3000:3000 \ -w /app -v "$(pwd):/app" \ --network todo-app \ -e MYSQL_HOST=mariadb \ -e MYSQL_USER=root \ -e MYSQL_PASSWORD=secret \ -e MYSQL_DB=todos \ node:12-alpine \ sh -c "yarn install && yarn run dev"
for the todo-app container. The same database commands (e.g.select * from todo_items;
) can be used, just don’t forget to connect beforehand to mariadb instead of mysql, e.g. viadocker exec -it <mariadb-container-id> mariadb -p todos
.Hope, this is helpful.