How to Install Docker Compose on Rocky Linux 8

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 file 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  45.1M      0 --:--:-- --:--:-- --:--:-- 58.2M

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, you can run the following command.

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 8


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