Home >Database >Mysql Tutorial >Why Can't I Pull the MySQL Docker Image on my Apple Silicon Mac, and How Can I Fix It?

Why Can't I Pull the MySQL Docker Image on my Apple Silicon Mac, and How Can I Fix It?

Patricia Arquette
Patricia ArquetteOriginal
2024-12-04 07:41:14240browse

Why Can't I Pull the MySQL Docker Image on my Apple Silicon Mac, and How Can I Fix It?

Unable to Pull MySQL Image on Apple Silicon: Manifest List Error

When attempting to pull the MySQL image using Docker Compose on Apple Silicon, users may encounter the following error:

ERROR: no matching manifest for linux/arm64/v8 in the manifest list entries

Reason:

This error occurs because the official MySQL image is not currently available for the ARM architecture used by Apple Silicon processors.

Workarounds:

Use Platform Annotation:

While this approach will not directly resolve the issue of running MySQL on ARM, it allows you to specify the platform for the MySQL service:

services:
  db:
    platform: linux/x86_64
    image: mysql:5.7
    ...

Use MariaDB Instead:

Alternatively, consider using MariaDB, as it is known to work on Apple Silicon with Docker Preview as a drop-in replacement:

services:
  db:
    image: mariadb:10.5.8
    ...

Both of these methods have been confirmed to work for some users on M1 Macs running Docker Preview.

The above is the detailed content of Why Can't I Pull the MySQL Docker Image on my Apple Silicon Mac, and How Can I Fix It?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn