Docker (Apple Silicon/M1 Preview) MySQL Error: "no matching manifest for linux/arm64/v8 in the manifest list entries"
This issue arises when attempting to pull the MySQL container image on an Apple Silicon Mac using the Docker Apple Silicon Preview. Upon running docker-compose, users encounter the error: "ERROR: no matching manifest for linux/arm64/v8 in the manifest list entries."
The culprit lies in the absence of an appropriate MySQL image built for ARM64 architecture, as the official MySQL Docker images are currently not compatible with Apple Silicon Macs. To address this, consider the following workaround:
Option 1: Manual Platform Specification
Modify the Docker Compose YAML file to explicitly specify the platform for the MySQL service:
services: db: platform: linux/x86_64 image: mysql:5.7 ...
By setting the platform to "linux/x86_64," you instruct Docker to pull the MySQL image built for x86_64 architecture, which is supported on Intel-based Macs.
Option 2: Alternative Database
Alternatively, use MariaDB as a drop-in replacement for MySQL, as it offers a compatible image for ARM64:
services: db: image: mariadb:10.5.8 ...
Both aforementioned solutions have been successfully implemented on M1 Macs with the Docker Preview and provide a working database service for your dockerized application.
The above is the detailed content of Why Does Docker on Apple Silicon Fail to Find a MySQL Image and How Can I Fix It?. For more information, please follow other related articles on the PHP Chinese website!