3

I am attempting to setup a basic project in Laravel using Laravel Sail. According to the official Laravel documentation the following commands will create a new Laravel application called "example-app" and start Laravel Sail.

curl -s "https://laravel.build/example-app" | bash
cd example-app
./vendor/bin/sail up

However, after running these commands I see the following error message:

ERROR: no matching manifest for linux/arm64/v8 in the manifest list entries
SnapShot
  • 5,464
  • 5
  • 42
  • 40

2 Answers2

7

This error occurs when using Laravel Sail on Macs with the Apple M1 chip. The docker-compose file provided by Laravel Sail uses MySQL by default. As configured, the docker-compose file is attempting to use an unknown version of MySQL (linux/arm64/v8). This fails with the error message above.

This can be solved by opening the docker-compose.yml file in the Laravel project root folder, searching the section named mysql and adding the following below the image: line

platform: 'linux/amd64'

Adding this line will run an Intel image under emulation on the Mac M1. You can read some background information about this in the official Docker document about Apple Silicon and here.

If possible for your use case this can also be resolved by switching the image to MariaDB instead of MySQL. MariaDB is basically binary compatible with MySQL. Using MariaDB may be a better option if possible because, as mentioned in the Docker document

Attempts to run Intel-based containers on Apple Silicon machines under emulation can crash as qemu sometimes fails to run the container.

Using the MySQL container in emulation on an M1 Mac could cause issues such as a segmentation fault when starting Sail - in fact I saw this issue in one case. Switching to MariaDB resolved this. You can switch Laravel Sail to MariaDB instead of MySQL by changing the image: line for the mysql service in the docker-compose.yml file to:

image: 'mariadb'

SnapShot
  • 5,464
  • 5
  • 42
  • 40
1

Posted this on Github thought I'll leave it here as well https://github.com/laravel/framework/issues/38370

Laravel Version: 8.54.0
PHP Version: 8.0
Database Driver & Version: MySQL 8
MacOS: Big Sur 11.5.2

Mac M1 Docker Laravel Sail MySQL 8 won't pull arm arch The example app won't "sail up" (docker-compose up) on M1 chips

Error:

Pulling mysql (mysql:8.0)...
8.0: Pulling from library/mysql
ERROR: no matching manifest for linux/arm64/v8 in the manifest list entries

https://github.com/laravel/framework/blob/fc0a4a7400cf528d05fd5660ffe8db372c50baa9/docker-compose.yml#L9

An easy fix would be to use MariaDB instead:

docker-compose.yml:

    mysql:
        image: 'mariadb'

Done

If you really need MySQL:

Recommended by docker, wasn't needed on my end.

Open up a Terminal -> softwareupdate --install-rosetta

Docker-compose.yml

    mysql:
        platform: linux/x86_64
        image: 'mysql:8.0'

After that, the correct MySQL image will be pulled.

sail up

Pulling mysql (mysql/mysql-server:8.0.23)...
8.0.23: Pulling from mysql/mysql-server

Done

other links: https://docs.docker.com/docker-for-mac/apple-silicon/ Docker (Apple Silicon/M1 Preview) MySQL "no matching manifest for linux/arm64/v8 in the manifest list entries"

DevJ3rry
  • 666
  • 6
  • 22