I'm managing several Docker containers on my Synology NAS, and I find the update process a bit tedious. Currently, I have to go through the Synology container manager and do the following steps: 1) Clean the project by using 'docker-compose down', which stops and deletes the containers. 2) Remove any unused images to ensure they're not reused in the next update. 3) Build the project again with 'docker-compose up' to pull the latest images and restart the containers. Is there a more straightforward way to do this? Would installing Portainer help with one-click updates, or would it be better to write a custom update script instead?
2 Answers
Are you familiar with using image tags? In your YAML file, you can specify the version like ':release' for certain apps. It helps to avoid pulling random updates every time you run the containers!
I recommend skipping the Container Manager. Just SSH into your Synology and run `docker compose pull && docker compose up -d`. It's much quicker. Also, instead of using the 'latest' tag, try specifying actual versions, so you won't have to pull every time. That makes it smoother!
If you're using fixed versions like 4.14.5, you'd need to manually update the version number each time, yes. But it really cuts down on chances of breaking changes!
Exactly! Keeping specific tags like ':release' or ':latest' can really make your updates smoother.