Today we are going to take a look at how you can update Docker Compose on a Synology NAS.
First off, if you aren’t sure how to use Docker Compose on a Synology NAS, I created a tutorial on how you can do it. The tutorial will walk you through Docker entirely and help you decide if Docker Compose is the right choice for you. This tutorial will focus on how you can update Docker Compose since the Docker Compose version shipped with a Synology NAS is fairly old.
1. Ensure that you have Docker installed. Docker Compose is automatically installed on a Synology NAS, but the device must have Docker installed.
2. Ensure you can SSH into your Synology NAS. Open Control Panel, select Terminal & SNMP, and Enable SSH service. If you are using Synology’s Firewall, ensure that you allow port 22 traffic. I created a video on how to SSH into your Synology NAS if you have any problems.
3. After you SSH into the device, run the command below to determine the version of Docker Compose you’re currently running.
4. Navigate to where the Docker Compose directory exists.
5. Back up the current directory by renaming it. This will keep the folder on your Synology NAS, but will not be overwritten by the update.
sudo mv docker-compose docker-compose-backup
6. Now that the directory has been renamed, we can run the script below which will automatically update Docker Compose. Please note that as of the writing of this tutorial, version 1.27.4 is the latest release. I would heir on the side of caution and not install anything other than the Latest Release, but you must update the version below (written in red) with the latest version. You can find the latest version at this link.
sudo curl -L https://github.com/docker/compose/releases/download/1.27.4/docker-compose-`uname -s`-`uname -m` -o docker-compose
NOTE: If you update to a version that doesn’t appear to work, delete the folder by running the command below, then rerun the command above with the prior version.
sudo rm docker-compose
7. Update the permissions so that the folder can be executed. This command gives execute permission to the folder on top of the permissions that it currently has.
sudo chmod +x docker-compose
8. Docker Compose is now updated! You can run the command below again to confirm that you’re on version 1.27.4. If you’re interested in learning why you might want to use Docker Compose as opposed to Synology’s Docker GUI, I explain it in greater detail in the video instructions!
Conclusion – Synology NAS Update Docker Compose
If you’ve made it this far, you can learn how to create Docker Compose containers on a Synology NAS in this tutorial. I also have a guide that will show you how to update Docker Compose containers. Some people find it easier to use Synology’s GUI, but Docker Compose opens a lot of possibilities for extremely easy container management!
As always, thank you for reading the tutorial. If you have any questions, please leave them in the comments!