【M1/M2環境のDockerエラー】no matching manifest for linux/arm64/v8 in the manifest list entries

今回はM1/M2環境で発生するDockerエラー「no matching manifest for linux/arm64/v8 in the manifest list entries」の対応の紹介です。
目次
no matching manifest for linux/arm64/v8 in the manifest list entriesとは?
「no matching manifest for linux/arm64/v8 in the manifest list entries 」のエラーは、使用しているDockerイメージが「linux/arm64/v8 」(Apple シリコン Mac など) 向けのビルドを提供していないことを意味します。
no matching manifest for linux/arm64/v8 in the manifest list entriesの原因箇所
no matching manifest for linux/arm64/v8 in the manifest list entriesの原因箇所はmysqlコンテナのイメージ部分です。
services:
mysql:
image: mysql:8.0
スポンサードサーチ
no matching manifest for linux/arm64/v8 in the manifest list entriesの対応方法
no matching manifest for linux/arm64/v8 in the manifest list entriesの対応方法はplatformにlinux/amd64オプションをつけることで解決します。
services:
mysql:
image: mysql:8.0
platform: linux/amd64
x86_64(Intel/AMD CPU)向けのイメージを強制的に使用します。
platform: linux/amd64

オプションを指定することで、MySQL 5.7のx86_64 版イメージがダウンロード・実行されます。

以上です