Sorry for the bother my linux (ubuntu noble) skills are mediocre. My container fails to startup automatically with the OS due to the following error. Strangely if I run docker start storagenode it starts just fine. My mount is present in fstab.
When I run “docker container inspect storagenode”
“ExitCode”: 127,
“Error”: “failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error mounting "/mnt/exos16tb/storj/storagenode1/identity/storagenode" to rootfs at "/app/identity": create mount destination for /app/identity mount: bind mount source stat: stat /mnt/exos16tb/storj/storagenode1/identity/storagenode: no such file or directory: unknown”,
fstab:
/dev/sda1 /mnt/exos16tb auto nosuid,nodev,nofail,x-gvfs-show 0 0
Seems it’s mounted. But perhaps it’s mounted after the docker daemon started. Sounds like you use NoRAID, they mount drives when it’s fully booted and user login but after the docker daemon is started, or perhaps something changed after the OS upgrade.
You need to fix that, please try this:
You can list mount units using systemctl list-unit-files | grep ".mount". For example, a mount point at /mnt/data might correspond to mnt-data.mount.
You need to modify the docker service with sudo systemctl edit docker.service. This creates an override file, preventing direct modification of the original systemd file.
Under the [Unit] section of the override file, add Requires= and After= entries for your specific mount unit. Replace your-mount-unit.mount with the actual name identified in step 1.
That worked using the override file, thank you. Impressive linux knowledge as always helping everyone here to great lengths. To answer your question I use the –mount flag in my docker run command line.