Run container via a scheduled task on Synology

Currently reading
Run container via a scheduled task on Synology

1
0
NAS
Ds920+
Operating system
  1. Windows
Mobile operating system
  1. Android
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

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

Could you please help me?
 
15
2
NAS
DS918+
Router
  1. RT2600ac
Operating system
  1. Linux
  2. Windows
Mobile operating system
  1. iOS
I use a task to start my portainer docker image. I do not call a script but call the command directly. And I run the task with user root. This works for me.

1634159806159.png


1634159868416.png
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

I am trying to solve a similar case: I am going to run my nginx:stable-alpine web server in Docker, with...
Replies
16
Views
6,010
@one-eyed-king , I have tried your first step: sudo synogroup --add docker and encounter the following...
Replies
11
Views
8,826
Done on both my NAS'es running Docker! :) Thanks again!
Replies
9
Views
7,137
Thank you for your feedback on the matter. There is no need to break this into multiple topics considering...
Replies
30
Views
4,838

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Top