使用以下 docker-compsoe 配置运行时,提示平台错误
services:
mysql:
image: mysql:5.7
volumes:
- mysql-volume:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=abcd1234
- MYSQL_DATABASE=emulate
ports:
- "3309:3306"
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci --init-connect='SET NAMES UTF8;' --innodb-flush-log-at-trx-commit=0
expose:
- "3306"
networks:
- traefik
ERROR: no matching manifest for linux/arm64/v8 in the manifest list entries
需要在配置中增加指定平台,修改后配置如下:
services:
mysql:
platform: linux/x86_64
image: mysql:5.7
volumes:
- mysql-volume:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=abcd1234
- MYSQL_DATABASE=emulate
ports:
- "3309:3306"
command: mysqld --character-set-server=utf8 --collation-server=utf8_unicode_ci --init-connect='SET NAMES UTF8;' --innodb-flush-log-at-trx-commit=0
expose:
- "3306"
networks:
- traefik
网友评论