Installing Docker Compose on Rocky Linux follows the same procedure as the other Linux distros. Docker Compose relies on Docker Engine so first, you need to make sure that you have installed Docker on your Rocky Linux machine. So once the Docker is set up on your machine you can proceed with the instructions about the Docker Compose.
- Rocky Linux 8
Install Compose on Rocky Linux 8
Step 1. Run the
curl command to download the current stable release of Docker Compose:
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
If you want to install different version change the number
1.29.2 from the link above. You can find the versions at Compose repository release page
Step 2. Once the download is finished apply executable permissions to the binary:
sudo chmod +x /usr/local/bin/docker-compose
Step 3. Create a symbolic link to
/usr/bin directory in your path:
sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
Step 4. Verify the installation:
docker-compose version 1.29.2, build 5becea4c
Uninstall Compose on Rocky Linux 8
Step 1. If you decide to uninstall Docker Compose execute:
sudo rm /usr/local/bin/docker-compose
Installing Docker Compose on Rocky Linux 8 is an easy procedure and if you followed the steps above you should have successfully installed Compose on
Rocky Linux 8.
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on telegram.