Easy upgrade of Docker containers on Synology
Overview
It was not obvious how to easily upgrade Synology Docker containers. The process I used to use involved manually copying settings into a new container. However, there's a better way.
The process outlined below is the easiest technique to upgrade using the GUI. I've found it to be a reliable process, and I now use this for all upgrades.
It should be possible to also perform this kind of upgrade using the command line and then execute manually as using the Task Scheduler. I'll probably look into that down the track.
Assumptions
- This process assumes that your configuration and data is stored outside of the docker container.
- Please ensure you have a backup process too.
- The process I'm documenting is for DSM 6.2, and I assume it is similar for later versions.
- This upgrade only works when the tag/version is unchanged - so would only work for a tag like latest or stable, but not a specific version like 1.2.3.
- Ideally confirm the version of the containerised software that is currently active - in case there are problems and you wish to fall-back.
Upgrade Process
Launch Synology Docker and identify the existing container you wish to upgrade. My container registry is evcc/evcc and the tag/version is latest.
Initiate download by double-clicking, and it will ask for the tag (version) to download. You must select the same tag that your existing container uses.
You will see an icon indicating that the image is downloading, and a notification when the download is finished.
Navigate back to the Container page. Stop the existing container, then select Settings / Duplicate settings. This will create a new container, using the new download image.
You will see an icon indicating that the image is downloading, and a notification when the download is finished.
Navigate back to the Container page. Stop the existing container, then select Settings / Duplicate settings. This will create a new container, using the new download image.
Choose a new name for your container. I'll just stick with the suggested name, and rename back later. Alternatively you may prefer to indicate the actual software version, or the date to ensure a unique name.
Now you can delete the original container. (Or if you prefer keep it around until you have tested the new version.)
Now you can delete the original container. (Or if you prefer keep it around until you have tested the new version.)
You can rename the container to get rid of "-copy". Select the new container, and click Edit, then edit the container name.
Comments