added persistent symlink instructions

desimaniac 2017-04-23 14:12:27 -05:00
parent ee93e69f80
commit 6da88e8813

@ -1,8 +1,20 @@
The Docker version installed on Synology DSM 6/6.1 is older than the one supported by Watchtower. Until Synology updates Docker or Watchtower lowers the compatibility requirements, here are the steps to get it to work with an older version of Watchtower. The Docker version installed on Synology DSM 6/6.1 is older than the one supported by Watchtower. Until Synology updates Docker or Watchtower lowers the compatibility requirements, here are the steps to get it to work with an older version of Watchtower.
Steps: Steps:
1. Symlink /var/run/docker.sock to /volume1/docker/docker.sock: `sudo ln -s /var/run/docker.sock /volume1/docker/docker.sock` 1. Create a shared folder called `docker`.
2. We need to Symlink /var/run/docker.sock to /volume1/docker/docker.sock because Synology Docker GUI will not be able to run it when it's pointed directly to /var/run/docker.sock. Also, the symlink needs to persist after reboot. To make it do so, you will need to create an automated task in your Synology DSM via "Task Scheduler".
1. Go to "Control Panel" > "Task Scheduler".
2. Click "Create" > "Scheduled Task" > "User-defined Script".
3. On the "Create Task: Window, make sure "User:" is selected as "root" and rename the "Task:" to whatever you like.
4. Click "Schedule" tab. Under "Date - Run on the following days", select "Daily". Under "Time - Frequency", select "Every 1 hour(s)" (just to be on the safe side).
5. Click "Task Settings" tab. Under "Run command - User-defined script", paste `sudo ln -s /var/run/docker.sock /volume1/docker/docker.sock` into the text box and press "OK".
6. The newly created task will be listed there. Click to highlight it and then click "Run" to run it once, immediately.
2. docker run command: `sudo docker run -d --name watchtower -v /volume1/docker/docker.sock:/var/run/docker.sock centurylink/watchtower --interval 82800 --cleanup` 2. Next, we need to download/pull and install the docker container. We can do all this with a single "docker run" command via shell.
1. First, SSH into Synology.
2. Then, run the following docker run command as sudo: `sudo docker run -d --name watchtower -v /volume1/docker/docker.sock:/var/run/docker.sock centurylink/watchtower --interval 82800 --cleanup`
3. You will now be able to run Watchtower via the Synology Docker GUI. You may also set it to restart automatically within the container settings.
Note: You may be able to do step 2 without using the shell (i.e. SSH) by scheduling a task like in Step 1 and deleting it after running it once. Feel free to try out any changes you like.
Note: The symlink to docker.sock is required (vs pointing to /var/run/docker.sock directly) to make it restartable in the Synology GUI.