-->
  • Recent Articles

    -bash: docker-compose: command not found

    -bash: docker-compose: command not found

    docker-compose

    If you Encounter this problem then it means that docker-compose is not installed. Let's install "docker-compose" now.

    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. You can run "docker-compose" now.


    No comments