When attempting to utilize Docker Compose to manage containers on Apple Silicon Preview, users may encounter an error while pulling the MySQL image:
ERROR: no matching manifest for linux/arm64/v8 in the manifest list entries
This error stems from the fact that the MySQL image does not provide a manifest for the ARM64 architecture, which is used by Apple Silicon devices. Here are two alternative solutions to address this issue:
1. Specify Platform for Service
While this approach does not resolve the underlying compatibility issue, it allows users to temporarily circumvent the error by explicitly specifying the platform for the MySQL service:
services: db: platform: linux/x86_64 image: mysql:5.7
2. Use MariaDB as a Replacement
MariaDB serves as a suitable drop-in replacement for MySQL and supports the ARM64 architecture. Replace the MySQL image in the Compose file with the MariaDB image:
services: db: image: mariadb:10.5.8
Both solutions have been confirmed to work on M1 devices with the Docker Preview. Users may choose the approach that best aligns with their requirements.
The above is the detailed content of How to Solve 'no matching manifest for linux/arm64/v8' Error When Using Docker Compose with MySQL on Apple Silicon?. For more information, please follow other related articles on the PHP Chinese website!