How to delay docker (container) startup?

I have embyserver running as a docker container on my CE box.

But unfortunately it starts before the media share (rclone) is mounted.

So I was wondering if there is a way to delay the start of this one container or of the whole docker engine for 10 to 20 seconds or after the media share is mounted.

How is your media share mounted? Using systemd script?

That is correct. I created a rclone.service file under system.d.

I wanted to run rclone as a container aswell but could geht that to run properly.

In this case just add in embyserver system service After= in Unit like

[Unit]
After=rclone.service

This way embyserver will start after rclone.

Is it possible to explain that a little bit more in detail?

When I take a look in /storage/.config/system.d/ there is no service named anything containing emby.
Or may I just add that to docker.service or service.system.docker.service

Both exist here.

Edit:
Adding:
After=rclone.service in section [Unit]
to docker.service seems to do the trick.

Thanks!

Perfect!

Emby service is probbably in some folder under /storage/.kodi/addons. But delaying whole docker works too.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.