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 "$(uname -s)-$(uname -m)" -o /usr/bin/docker-compose


[root@vps ~]# curl -L "$(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


[root@vps ~]# docker-compose --version
Docker Compose version v2.12.2
[root@vps ~]#

This concludes the Installation of Docker Compose on Rocky Linux 8