I have followed the instructions in this thread, more specifically the JSON file in /etc/docker, but I have a problem. I have moved everything to /media/pi/MP3/Docker/Docker-System
, which is on a 2 TB SSD, which is a lot faster than the regular SSD card. But If I use the regular systemd startup, Docker will load before fstab most of the time, so I will have two MP3 in /media/pi/
, one that resides on the SSD card and has a Docker directory, and one that is the SSD with the files I want to use.
I have tried a few solutions.
- RequiresMountsFor=/media/pi/MP3 That gives me this Unit:
[Unit]
Description=Docker Application Container Engine
Documentation=https://docs.docker.com
After=network-online.target docker.socket firewalld.service containerd.service time-set.target
Wants=network-online.target containerd.service
RequiresMountsFor=/media/pi/MP3
Requires=docker.socket
Docker does not start at all, it errors out without any meaningful explanation in status or journalctl:
× docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; preset: enabl>
Active: failed (Result: exit-code) since Thu 2024-08-01 21:08:13 CEST; 41s>
TriggeredBy: × docker.socket
Docs: https://docs.docker.com
Process: 1969 ExecStartPre=/bin/sleep 10 (code=exited, status=0/SUCCESS)
Process: 1985 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/contain>
Main PID: 1985 (code=exited, status=1/FAILURE)
CPU: 191msaug. 01 21:08:13 MadMax systemd[1]: docker.service: Scheduled restart job, rest>
aug. 01 21:08:13 MadMax systemd[1]: Stopped docker.service - Docker Application>
aug. 01 21:08:13 MadMax systemd[1]: docker.service: Start request repeated too >
aug. 01 21:08:13 MadMax systemd[1]: docker.service: Failed with result 'exit-co>
aug. 01 21:08:13 MadMax systemd[1]: Failed to start docker.service - Docker App>
- Disable docker.socket and docker.service and add a docker.timer, with a 10 second delay. and adding
ExecStartPre=/bin/sleep 10
to the docker.service file. Both give me this:
× docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; disabled; preset: enabled)
Active: failed (Result: exit-code) since Thu 2024-08-01 21:01:11 CEST; 25s ago
TriggeredBy: × docker.socket
● docker.timer
Docs: https://docs.docker.com
Process: 1992 ExecStartPre=/bin/sleep 10 (code=exited, status=0/SUCCESS)
Process: 2008 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
Main PID: 2008 (code=exited, status=1/FAILURE)
CPU: 207ms
aug. 01 21:01:11 MadMax systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
aug. 01 21:01:11 MadMax systemd[1]: Stopped docker.service - Docker Application Container Engine.
aug. 01 21:01:11 MadMax systemd[1]: docker.service: Start request repeated too quickly.
aug. 01 21:01:11 MadMax systemd[1]: docker.service: Failed with result 'exit-code'.
aug. 01 21:01:11 MadMax systemd[1]: Failed to start docker.service - Docker Application Container Engine.
~
Can somebody please give me a hint to what I should do to get this working? My images take too much space, so I really need them to be on the SSD.