question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Part 7: Multi-Container apps: Cannot run MySQL container in arm64 arquitecture

See original GitHub issue

Hi, 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:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

13reactions
antalvarengacommented, May 7, 2021

I managed to solve it by simply passing the flag --platform linux/amd64.

Would be nice though if this info was in the tutorial

4reactions
wkerndlmcommented, Aug 5, 2021

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 and docker 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. via docker exec -it <mariadb-container-id> mariadb -p todos.

Hope, this is helpful.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found