E
E
eredinBreaccGlas2021-06-11 20:59:42
MySQL
eredinBreaccGlas, 2021-06-11 20:59:42

Why is docker-compose not running?

Hello. I'm trying to run docker-compose, but when I run it, I get an error related to the mysql library. On another machine, everything starts and works as it should. I beg you to help, maybe someone faced such a problem, googled solutions did not help me.
System: macOS Big Sur, Apple m1
Console:

docker-compose -f docker-compose-test.yml up -d
[+] Building 2.0s (3/3) FINISHED                                                
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 51B                                        0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => ERROR [internal] load metadata for docker.io/library/mysql:5.7         1.9s
------
 > [internal] load metadata for docker.io/library/mysql:5.7:
------
failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:a682e3c78fc5bd941e9db080b4796c75f69a28a8cad65677c23f7a9f18ba21fa: not found

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Denis Yuriev, 2021-06-11
@eredinBreaccGlas

System: macOS Big Sur, Apple m1

docker.io/library/mysql:5.7

This image is only for the amd64 platform
. You have arm64
Or use amd64 emulation:
services:
  db:
    platform: linux/x86_64
    image: mysql:5.7

or use mariadb instead of mysql
services:
  db:
    image: mariadb:10.5

F
FullStack Alex, 2021-07-13
@FullStackAlex

I had to turn in my Macbook with intel x86-64 for repair for a week and therefore tinker with the M1 Macbook. Of all the containers, only Mysql did not start for me either, since their default images are not designed for ARM processors. But with --platform linux/amd64 everything worked:

services:
  db:
    platform: linux/amd64

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question