Docker (Apple Silicon/M1 Preview) MySQL“在清单列表条目中没有与 linux/ar

2023-09-18数据库问题
2

本文介绍了Docker (Apple Silicon/M1 Preview) MySQL“在清单列表条目中没有与 linux/arm64/v8 匹配的清单"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

我正在运行 Docker Apple Silicon Preview. 我创建了教程容器/图像,它运行良好.当我创建自定义 YAML 文件并运行 docker-compose 时,我在拉取 mysql 时出现以下错误:

I'm running the latest build of the Docker Apple Silicon Preview. I created the tutorial container/images and it works fine. When I went to create a custom YAML file and run docker-compose I get the following error when pulling mysql:

错误:清单列表条目中没有与 linux/arm64/v8 匹配的清单

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

这是我的 YAMl 文件中的一个片段:

Here is a snippet from my YAMl file:

version: '3'

services:
  # Database
  db:
    image: mysql-server:5.7
    volumes:
      - db_data:/var/lib/mysql
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: pass
      MYSQL_DATABASE: wp
      MYSQL_USER: wp
      MYSQL_PASSWORD: wp
    networks:
      - wpsite 

我试过 :latest 和 :8 都导致同样的错误.它可以很好地拉动 phpmyadmin 和 wordpress.

I've tried :latest and :8 which result in the same error. It pulls phpmyadmin and wordpress fine.

推荐答案

好吧,从技术上讲它不会解决您的问题(在 ARM 上运行 MySQL),但暂时您可以添加 platform到您的服务,如:

Well, technically it will not solve your issue (running MySQL on ARM), but for the time being, you could add platform to your service like:

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

或者,考虑使用 MariaDB,它应该可以作为替代品,例如这个:

Alternatively, consider using MariaDB, which should work as a drop-in replacement like e.g. this:

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

使用 Docker 预览版在 M1 上这两种方法都对我有用

Both ways work for me on M1 with the Docker Preview

这篇关于Docker (Apple Silicon/M1 Preview) MySQL“在清单列表条目中没有与 linux/arm64/v8 匹配的清单"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

The End

相关推荐

Mysql目录里的ibtmp1文件过大造成磁盘占满的解决办法
ibtmp1是非压缩的innodb临时表的独立表空间,通过innodb_temp_data_file_path参数指定文件的路径,文件名和大小,默认配置为ibtmp1:12M:autoextend,也就是说在文件系统磁盘足够的情况下,这个文件大小是可以无限增长的。 为了避免ibtmp1文件无止境的暴涨导致...
2025-01-02 数据库问题
151

SQL 子句“GROUP BY 1"是什么意思?意思是?
What does SQL clause quot;GROUP BY 1quot; mean?(SQL 子句“GROUP BY 1是什么意思?意思是?)...
2024-04-16 数据库问题
62

MySQL groupwise MAX() 返回意外结果
MySQL groupwise MAX() returns unexpected results(MySQL groupwise MAX() 返回意外结果)...
2024-04-16 数据库问题
13

MySQL SELECT 按组最频繁
MySQL SELECT most frequent by group(MySQL SELECT 按组最频繁)...
2024-04-16 数据库问题
16

为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同
Why Mysql#39;s Group By and Oracle#39;s Group by behaviours are different(为什么 Mysql 的 Group By 和 Oracle 的 Group by 行为不同)...
2024-04-16 数据库问题
13

MySQL GROUP BY DateTime +/- 3 秒
MySQL GROUP BY DateTime +/- 3 seconds(MySQL GROUP BY DateTime +/- 3 秒)...
2024-04-16 数据库问题
14