How to Install Docker Compose on Rocky Linux 10
Installing Docker Compose
Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a Compose file to configure your application's services. Then, using a single command, you create and start all the services from your configuration.
Use curl
to download the Compose binary into the /usr/bin
directory.
curl -L "https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose
Output:
[root@vps ~]# curl -L "https://github.com/docker/compose/releases/download/v2.12.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 42.8M 100 42.8M 0 0 28.3M 0 0:00:01 0:00:01 --:--:-- 37.0M
Next, set the correct permissions so that the docker-compose
command is executable:
chmod +x /usr/bin/docker-compose
To verify that the installation was successful, run:
docker-compose --version
Output:
[root@vps ~]# docker-compose --version
Docker Compose version v2.12.2
[root@vps ~]#
This concludes the installation of Docker Compose on Rocky Linux 10.
CrownCloud - Get a SSD powered KVM VPS at $4.5/month!
Use the code WELCOME
for 10% off!
1 GB RAM / 25 GB SSD / 1 CPU Core / 1 TB Bandwidth per month
Available Locations: LAX | MIA | ATL | FRA | AMS