Docker Community Forums

Share and learn in the Docker community.

Run container via a scheduled task on Synology

Hello,

I would like to be able to start a container via a basic command line:
docker container start rutorrent-vpn

However, when the nas runs the script, the container does not start and I get an error message :
line 1: docker: command not found

Could you please help me?

Thank you

Does anyone have a solution?

Thanks

The script must be run as root. If it’s already executed as root, and it’s still not working: use the full path to the docker binary (/usr/local/bin/docker).

Hello,

Thank you for your feedback.
The script is running in Root.
The 1st script is the command: /usr/local/bin/docker container start rutorrent-vpn

The return is :
line 1: /usr/local/bin/docker: No such file or directory

On the other hand, I did inject the /usr/local/bin/docker into the PATH.
Here is the return of the $PATH export:
-sh: export: `/sbin:/bin:/usr/sbin:/usr/bin:/usr/syno/sbin:/usr/syno/bin:/usr/local/sbin:/usr/local/bin’: not a valid identifier

I can’t imagine that the path would be different on your system…
Though, this is a symlink created when the docker package is started. If the package is not started, the symlink does not exist. I have no idea why this happens for you and how to fix it.

You might want to raise this question in the higly recommended The unofficial Synology forum for NAS owners and enthusiasts or the official Synology forum.

1 Like