Home > Database > Mysql Tutorial > Why Does Docker on Apple Silicon Fail to Find a MySQL Image and How Can I Fix It?

Why Does Docker on Apple Silicon Fail to Find a MySQL Image and How Can I Fix It?

Susan Sarandon
Release: 2024-12-11 13:18:11
Original
979 people have browsed it

Why Does Docker on Apple Silicon Fail to Find a MySQL Image and How Can I Fix It?

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
    ...
Copy after login

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
    ...
Copy after login

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!

source:php.cn
Statement of this Website
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
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template