问题描述
我正在运行 Docker Apple Silicon Preview.我创建了教程容器/图像,并且效果很好.当我去创建一个自定义的YAML文件并运行docker-compose时,在提取mysql时出现以下错误:
I'm running the latest build of the Docker Apple Silicon Preview. I created the tutorial container/images and it works fine. When I went to create a custom YAML file and run docker-compose I get the following error when pulling mysql:
错误:清单列表条目中没有linux/arm64/v8的匹配清单
ERROR: no matching manifest for linux/arm64/v8 in the manifest list entries
这是我的YAMl文件中的摘录:
Here is a snippet from my YAMl file:
version: '3'
services:
# Database
db:
image: mysql-server:5.7
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
MYSQL_ROOT_PASSWORD: pass
MYSQL_DATABASE: wp
MYSQL_USER: wp
MYSQL_PASSWORD: wp
networks:
- wpsite
我尝试了:latest和:8导致相同的错误.它可以使phpmyadmin和wordpress正常运行.
I've tried :latest and :8 which result in the same error. It pulls phpmyadmin and wordpress fine.
推荐答案
从技术上讲,它不能解决您的问题(在ARM上运行MySQL),但是暂时可以添加 platform
您的服务,例如:
Well, technically it will not solve your issue (running MySQL on ARM), but for the time being, you could add platform
to your service like:
services:
db:
platform: linux/x86_64
image: mysql:5.7
...
或者,考虑使用MariaDB,它应该可以像其他应用程序那样直接替换.这个:
Alternatively, consider using MariaDB, which should work as a drop-in replacement like e.g. this:
services:
db:
image: mariadb:10.5.8
...
在Docker Preview上,这两种方式对我来说都适用
Both ways work for me on M1 with the Docker Preview
这篇关于Docker(Apple Silicon/M1预览)MySQL“清单列表条目中没有linux/arm64/v8的匹配清单"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!