-->

DEVOPSZONES

  • Recent blogs

    How to Install Docker Compose on CentOS 7

    How to Install Docker Compose on CentOS 7

    docker-compose

    Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application's services.Docker Compose is an open source utility used for setting up different things like automated testing, hosting application deployment etc.  In this tutorial we are going to discuss on How to Install Docker Compose on CentOS 7.

    Prerequisites
    Needless to say that you should have a running Docker installation. If you need to Install docker then follow this document Docker Installation & Configuration ON CENTOS 7.


    We need to install the latest version of Docker Composer by downloading it from Github’s Docker Compose Repository Release Page, as the Official centos 7 repository does not have the the latest version. You can check the latest version on this page.


    Download Docker Compose:

    curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

    Example:
    [root@appserver1 mycicdtest]# curl -L "https://github.com/docker/compose/releases/download/1.24.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
      % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                     Dload  Upload   Total   Spent    Left  Speed
    100   617    0   617    0     0   1558      0 --:--:-- --:--:-- --:--:--  1558
    100 15.4M  100 15.4M    0     0  4091k      0  0:00:03  0:00:03 --:--:-- 6214k
    [root@appserver1 mycicdtest]#

    Set the permission to executable on "docker-compose"
    chmod +x /usr/local/bin/docker-compose

    Example:
    [root@appserver1 mycicdtest]# chmod +x /usr/local/bin/docker-compose

    Confirm the installation and verify the Docker Compose version number by typing following command:

    docker-compose --version


    Example:
    [root@appserver1 mycicdtest]# docker-compose --version
    docker-compose version 1.24.0, build 0aa59064
    [root@appserver1 mycicdtest]#

    Now you have successfully installed Docker Compose on CentOS 7.

    Uninstall Docker Compose
    To uninstall Docker Compose, you can just remove directory "/usr/local/bin/docker-compose" by running following command:

    rm /usr/local/bin/docker-compose

    No comments