I have a Raspberry Pi 3 Model B with Arch ARM installed on it. I try to get a mysql server running via Docker on that device, but I keep failing to get it running. This is my docker-compose.yml file
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:
The error message I am getting is the following:
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'")
I already tried multiple images - mysql - mariadb - mysql/mysql-server - mysql/mysql-server:latest-aarch64
With the image arm64v8/mariadb I get the above error message. With the mysql image, I get the error message
ERROR: no matching manifest for unknown in the manifest list entries
I think I get what the error actually is. I think docker can not figure out what my architecture actually is, but I can not figure out why this is.
After several tries, I found an image that works with Arch Linux on the PI. I am now using webhippie/mariadb
and it does what it should do. Not sure why the others did not work.