How to Update Docker Synology – A Comprehensive Guide
A virtualization application that makes it easy to access containers created by various developers is called Docker. This blog will provide instructions on how to update Docker on Synology NAS.
Docker, in simple words, allows an individual to create an image (generally called Docker image) for a container and upload it on the server. A container may have various packages in the form of an image for your NAS. Changes can also be made to the container. Since moving different packages separately can create problems for you, containerization is a whole new intelligent concept that is carried out with the help of a Docker. If we say, how to update Docker, then definitely, the blog will be about updating the Docker image.
Environment for Updating Docker Image
- First of all, create the Docker image containing packages.
- The DSM version should be DSM 6.2 or above
- Also, the Docker version should be updated. It needs to be done if the Docker version is less than 17.05
How to Update Docker Image on Synology NAS?
This is for a general information that the latest DSM version for the NAS device can be downloaded from Synology Download Center. Now, check out the instructions highlighted below for updating Docker on NAS manually:
- Access the DiskStation manager at http://<IP-NAS:5000v2.
- Use the IP of the NAS in place of IP-NAS.
- If prompted, log in using the correct administration details.
- Go to Registry.
- Download the latest image file now.
- Go to Container.
- Choose the container that you wish to update.
- Go to the Actions menu now.
- Select Clear.
- If you are using DSM<7, you will see Reset instead of Clear.
- Restart the container.
The container will be completed and start with the latest Docker image. Note that the application data will not be erased because data folders are mounted into the container. Hence, the Docker on Synology NAS will be updated.
Enable Automatic Update of Docker on Synology NAS
Small amount of Docker images can be easily updated manually. However, it will consume a lot of time if there are a lots of packages in the Docker image. It can be done easily with the help of a Docker container known as Watchtower. It will enable automatic updates of Docker. The Docker image is – containrrr/watchtower. The steps given below will help setting it up:
- Open the Docker Registry and load the image – containrrr/watchtower.
- Sign in to the DSM with root privilege.
- Launch terminal on your PC and access the command: ssh DSM admin account@DSM IP address-p SSH port number.
- Type the Synology login password.
- Type sudo –I and press Enter.
- Re-enter the NAS admin password.
- You are now logged in to your DSM with root privilege via SSH.
- Run this code in the shell now: docker run –d –network host –name watchtower-once –v /var/run/docker.sockcontainrrr/watchtower:latest –cleanup –include-stopped –run-once.
- The Watchtower image will start and container will be updated.
- In case, you want to schedule Docker update, use Synology Task Scheduler.
The Final Words
Docker container is a great solution to install and access all packages at once and access them on Synology NAS. But, updating is required sometimes. It can be simply done by updating the Docker image. Hopefully, using the information provided in the blog, you will be able to update Docker successfully.