Since there is a new version of Sonarr3 and it requires updating the docker manually, what is the best way on the Synology to update the docker without destroying the existing data in it?
The Synology does have docker-compose and docker-init available from the command line, but not docker-pull
One set of unofficial instructions I found said to simply update the docker in the GUI registry and then stop the container, ~hit clear and restart it~. Not knowing what clear does, that sounds like something I don’t want to do?
This will not work, as the new version and the old version are not “latest” as so a new docker image is downloaded for the new version.
unless youve done something really silly and not mapped a /config volume you should never lose any config or data by deleting the container. worse case you would need to re-enter the container parameters again if you want to swap images.
i dont use the DSM docker GUI, i have a bash script i wrote to wrapper the commands as i wanted more control over the parameters for the container, and so i didnt have to re-enter them all the time. could probably use docker-compose instead but i havent gotten around to that yet
you want docker pull 'linuxserver/sonarr' or docker pull 'linuxserver/sonarr:tagname' if youre wanting a specific tagged version and not the latest.
in the GUI i think you just download the image again, selecting ‘latest’ and it should overwrite the one you have
then follow what you have.
i didnt know what clear did either but i tried it and it seems to delete the container but doesnt delete the entry in the DSM docker GUI for it (which makes it easy to re-start it without having to re-enter all the parameters again - presuming you want to use the same, possibly upgraded, image)
if you are using different tagged images each time then yes youll need to rebuild the container in the GUI - another reason i use a script
the container-action.sh file is in my /volume3/docker/ folder as all my containers live in folders under there. you can put it anywhere you like but its probably better being in your docker folder.
the container.sh file goes into each container folder, eg /volume3/docker/sonarr/container.sh
i also flagged both scripts as executable
edit container.sh;
change CONTAINER_NAME and CONTAINER_IMAGE to match your container.
change the exec path to match where you put container-action.sh
make sure all the container parameters are correct.
you can then go into the folder for a specific container and run ./container.sh run
it will accept stop | start | restart | run | create | remove | upgrade
theres probably a better way to do this but this is simple and works for me so i havent looked that hard for a replacement
In the GUI, download the image from the registry and ensure tag is ‘preview’ to get the most up to date v3. Using ‘latest’ will always get v2. Once downloaded, stop the v3 container, run the clear action on the container, then start and the update is done. Make sure ‘/config’ has been mapped in the container to a real directory and no data will be lost.