gpt4 book ai didi

mysql - Docker mysql 镜像在带有 Arch ARM 的 Raspberry Pi 上不断失败

转载 作者:行者123 更新时间:2023-11-29 02:09:32 25 4
gpt4 key购买 nike

我有一个安装了 Arch ARM 的 Raspberry Pi 3 Model B。我试图通过该设备上的 Docker 运行一个 mysql 服务器,但我一直无法运行它。这是我的 docker-compose.yml 文件

version: "3.7"
services:
php73:
container_name: picloud-ditscheid_php73
build:
context: .
dockerfile: php-fpm73.Dockerfile
restart: always
ports:
- 9000:9000
volumes:
- /var/www/vhosts:/var/www/vhosts
apache:
container_name: picloud-ditscheid_apache
image: httpd:2.4
restart: always
network_mode: "host"
volumes:
- /var/www/vhosts:/var/www/vhosts
- /var/logs/apache:/var/logs
- ./apache.conf:/usr/local/apache2/conf/extra/apache.conf
- ./httpd.conf:/usr/local/apache2/conf/httpd.conf
mysql:
container_name: picloud-ditscheid_mysql
image: arm64v8/mariadb
command: --default-authentication-plugin=mysql_native_password
restart: always
network_mode: "host"
environment:
MYSQL_ROOT_PASSWORD: doesntmatter
volumes:
- mysqlDb:/var/lib/mysql
volumes:
mysqlDb:

我得到的错误信息如下:

picloud-ditscheid_apache | [Sun Jun 23 10:44:52.179321 2019] [mpm_event:notice] [pid 1:tid 1995500672] AH00489: Apache/2.4.39 (Unix) configured -- resuming normal operations
picloud-ditscheid_apache | [Sun Jun 23 10:44:52.180252 2019] [core:notice] [pid 1:tid 1995500672] AH00094: Command line: 'httpd -D FOREGROUND'
picloud-ditscheid_mysql | standard_init_linux.go:207: exec user process caused "exec format error"
picloud-ditscheid_php73 | [23-Jun-2019 10:44:55] NOTICE: fpm is running, pid 1
picloud-ditscheid_php73 | [23-Jun-2019 10:44:55] NOTICE: ready to handle connections
picloud-ditscheid_mysql exited with code 1
picloud-ditscheid_mysql | standard_init_linux.go:207: exec user process caused "exec format error"
picloud-ditscheid_mysql | standard_init_linux.go:207: exec user process caused "exec format error"
picloud-ditscheid_mysql | standard_init_linux.go:207: exec user process caused "exec format error"
picloud-ditscheid_mysql exited with code 1
picloud-ditscheid_mysql exited with code 1
Exception in thread Thread-10:
Traceback (most recent call last):
File "/usr/lib/python3.7/site-packages/docker/api/client.py", line 256, in _raise_for_status
response.raise_for_status()
File "/usr/lib/python3.7/site-packages/requests/models.py", line 940, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 409 Client Error: Conflict for url: http+docker://localhost/v1.38/containers/d34510381d4b74d5e271ba560be1b787109474bfe31f3a2db784b25fecddaffb/attach?logs=0&stdout=1&stderr=1&stream=1

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
self.run()
File "/usr/lib/python3.7/threading.py", line 865, in run
self._target(*self._args, **self._kwargs)
File "/usr/lib/python3.7/site-packages/compose/cli/log_printer.py", line 233, in watch_events
event['container'].attach_log_stream()
File "/usr/lib/python3.7/site-packages/compose/container.py", line 215, in attach_log_stream
self.log_stream = self.attach(stdout=True, stderr=True, stream=True)
File "/usr/lib/python3.7/site-packages/compose/container.py", line 307, in attach
return self.client.attach(self.id, *args, **kwargs)
File "/usr/lib/python3.7/site-packages/docker/utils/decorators.py", line 19, in wrapped
return f(self, resource_id, *args, **kwargs)
File "/usr/lib/python3.7/site-packages/docker/api/container.py", line 61, in attach
response, stream, self._check_is_tty(container), demux=demux)
File "/usr/lib/python3.7/site-packages/docker/api/client.py", line 395, in _read_from_socket
socket = self._get_raw_response_socket(response)
File "/usr/lib/python3.7/site-packages/docker/api/client.py", line 306, in _get_raw_response_socket
self._raise_for_status(response)
File "/usr/lib/python3.7/site-packages/docker/api/client.py", line 258, in _raise_for_status
raise create_api_error_from_http_exception(e)
File "/usr/lib/python3.7/site-packages/docker/errors.py", line 31, in create_api_error_from_http_exception
raise cls(e, response=response, explanation=explanation)
docker.errors.APIError: 409 Client Error: Conflict ("b'container d34510381d4b74d5e271ba560be1b787109474bfe31f3a2db784b25fecddaffb is restarting, wait until the container is running'")

我已经尝试了多个图像- MySQL- MariaDB- mysql/mysql 服务器- mysql/mysql-server:latest-aarch64

使用图像 arm64v8/mariadb 我得到上面的错误消息。使用 mysql 镜像,我得到错误消息

ERROR: no matching manifest for unknown in the manifest list entries

我想我明白了错误到底是什么。我认为 docker 无法弄清楚我的架构实际上是什么,但我无法弄清楚为什么会这样。

最佳答案

经过几次尝试,我在 PI 上找到了一个适用于 Arch Linux 的镜像。我现在正在使用 webhippie/mariadb 并且它做了它应该做的事情。不确定为什么其他人不起作用。

关于mysql - Docker mysql 镜像在带有 Arch ARM 的 Raspberry Pi 上不断失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56723236/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com