请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

启动docker服务问题

老师,为什么我在启动docker服务时,报ERROR: Service ‘mysql’ failed to build : Build failed这个错误?

正在回答 回答被采纳积分+3

1回答

檀梵 2021-08-07 21:40:09

这是mysql容器构建失败,需要看下具体的报错

0 回复 有任何疑惑可以回复我~
  • 提问者 Disciplina #1
    ➜  laradock git:(master) docker-compose up -d redis mysql nginx workspace
    Building mysql
    [+] Building 3.2s (4/4) FINISHED
     => [internal] load build definition from Dockerfile                       0.0s
     => => transferring dockerfile: 37B                                        0.0s
     => [internal] load .dockerignore                                          0.0s
     => => transferring context: 2B                                            0.0s
     => ERROR [internal] load metadata for docker.io/library/mysql:latest      3.1s
     => [auth] library/mysql:pull token for registry-1.docker.io               0.0s
    ------
     > [internal] load metadata for docker.io/library/mysql:latest:
    ------
    failed to solve with frontend dockerfile.v0: failed to create LLB definition: no match for platform in manifest sha256:8b928a5117cf5c2238c7a09cd28c2e801ac98f91c3f8203a8938ae51f14700fd: not found
    ERROR: Service 'mysql' failed to build : Build failed
    ➜  laradock git:(master)
    
    
    这里是具体的报错
    回复 有任何疑惑可以回复我~ 2021-08-08 15:56:47
  • 檀梵 #2
    mac m1环境会有问题,参考下这个issue : https://github.com/laradock/laradock/issues/2969
    修改一下mysql的docker-compose文件
    
    image: mysql:8.0.19
    platform: 'linux/x86_64'
    回复 有任何疑惑可以回复我~ 2021-08-09 19:44:17
  • 檀梵 #3
    mysql版本可以用latest不用改
    回复 有任何疑惑可以回复我~ 2021-08-09 19:45:25
问题已解决,确定采纳
还有疑问,暂不采纳
意见反馈 帮助中心 APP下载
官方微信