Mac筆記本m1芯片,使用docker 創(chuàng)建mysql的時(shí)候容易出現(xiàn)這個(gè)錯(cuò)誤,解決方法:
添加 platform: linux/x86_64
version: '3.7'
services:
database:
image: 'mysql:5.7'
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_DATABASE: teebblog
ports:
# To allow the host machine to access the ports below, modify the lines below.
# For example, to allow the host to connect to port 3306 on the container, you would change
# "3306" to "3306:3306". Where the first port is exposed to the host and the second is the container port.
# See https://docs.docker.com/compose/compose-file/#ports for more information.
- '8888:3306'
platform: linux/x86_64