How to upgrade docker-compose to latest version





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







20















I have installed docker-compose using the command



sudo apt install docker-compose



It installed docker-compose version 1.8.0 and build unknown



I need the latest version of docker-compose or at least a version of 1.9.0



Can anyone please let me know what approach I should take to upgrade it or uninstall and re-install the latest version.



I have checked the docker website and can see that they are recommending this to install the latest version'



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



But before that, I have to uninstall the present version, which can be done using the command



sudo rm /usr/local/bin/docker-compose



but this can be used only when the installation was done using curl. I am not sure if the installation was done by curl as I have used



sudo apt install docker-compose



Please let me know what should I do now to uninstall and re-install the docker-compose.










share|improve this question































    20















    I have installed docker-compose using the command



    sudo apt install docker-compose



    It installed docker-compose version 1.8.0 and build unknown



    I need the latest version of docker-compose or at least a version of 1.9.0



    Can anyone please let me know what approach I should take to upgrade it or uninstall and re-install the latest version.



    I have checked the docker website and can see that they are recommending this to install the latest version'



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



    But before that, I have to uninstall the present version, which can be done using the command



    sudo rm /usr/local/bin/docker-compose



    but this can be used only when the installation was done using curl. I am not sure if the installation was done by curl as I have used



    sudo apt install docker-compose



    Please let me know what should I do now to uninstall and re-install the docker-compose.










    share|improve this question



























      20












      20








      20


      3






      I have installed docker-compose using the command



      sudo apt install docker-compose



      It installed docker-compose version 1.8.0 and build unknown



      I need the latest version of docker-compose or at least a version of 1.9.0



      Can anyone please let me know what approach I should take to upgrade it or uninstall and re-install the latest version.



      I have checked the docker website and can see that they are recommending this to install the latest version'



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



      But before that, I have to uninstall the present version, which can be done using the command



      sudo rm /usr/local/bin/docker-compose



      but this can be used only when the installation was done using curl. I am not sure if the installation was done by curl as I have used



      sudo apt install docker-compose



      Please let me know what should I do now to uninstall and re-install the docker-compose.










      share|improve this question
















      I have installed docker-compose using the command



      sudo apt install docker-compose



      It installed docker-compose version 1.8.0 and build unknown



      I need the latest version of docker-compose or at least a version of 1.9.0



      Can anyone please let me know what approach I should take to upgrade it or uninstall and re-install the latest version.



      I have checked the docker website and can see that they are recommending this to install the latest version'



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



      But before that, I have to uninstall the present version, which can be done using the command



      sudo rm /usr/local/bin/docker-compose



      but this can be used only when the installation was done using curl. I am not sure if the installation was done by curl as I have used



      sudo apt install docker-compose



      Please let me know what should I do now to uninstall and re-install the docker-compose.







      docker-compose






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 7 at 3:39









      Vini.g.fer

      4,95593661




      4,95593661










      asked Apr 15 '18 at 6:12









      SambhavSambhav

      115118




      115118
























          8 Answers
          8






          active

          oldest

          votes


















          30














          If you want to follow the instructions on the Docker site, you should remove the existing docker-compose with



          sudo apt-get remove docker-compose


          then find the newest version on the release page at GitHub or by curling the API if you have jq installed (thanks to dragon788 and frbl for this improvement):



          VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)


          Then download and change permissions to your favorite $PATH-accessible location:



          DESTINATION=/usr/local/bin/docker-compose
          sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION
          sudo chmod +x $DESTINATION





          share|improve this answer





















          • 1





            not working for me :/

            – NotSoShabby
            Nov 25 '18 at 10:07











          • Can you give some details about how it's not working?

            – Eric M. Johnson
            Nov 27 '18 at 1:38






          • 1





            try updating path in /usr/local/bin/docker-compose and then run sudo chmod +x /usr/bin/docker-compose

            – Raj Kumar Goyal
            Nov 27 '18 at 8:14








          • 1





            No need to move the file. The /usr/local/bin path should be in $PATH already. Just chmod in place. Answer updated to reflect this.

            – Gold
            Nov 29 '18 at 1:09



















          9














          Based on @eric-johnson's answer, I'm currently using this in a script:



          #!/bin/bash
          compose_version=$(curl https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)
          output='/usr/local/bin/docker-compose'
          curl -L https://github.com/docker/compose/releases/download/$compose_version/docker-compose-$(uname -s)-$(uname -m) -o $output
          chmod +x $output
          echo $(docker-compose --version)


          it grabs the latest version from the GitHub api.






          share|improve this answer































            8














            The easiest way to have a permanent and sustainable solution for the Docker Compose installation and the way to upgrade it, is to just use the package manager pip (if you´re on Linux) with:



            pip install docker-compose


            I was searching for a good solution for the ugly "how to upgrade to the latest version number"-problem, which appeared after you´ve read the official docs - and just found it occasionally - just have a look at the docker-compose pip package - it should reflect (mostly) the current number of the latest released Docker Compose version.



            A package manager is always the best solution if it comes to managing software installations! So you just abstract from handling the versions on your own.






            share|improve this answer
























            • +1 great answer. Before: I had docker-compose version: docker-compose version 1.21.2, build a133471 So to upgrade to latest non-RC version, I found this to work in order to upgrade: 1) apt install python-pip to install PIP then pip install docker-compose to install the latest and then to check the version: docker-compose --version which gave me: docker-compose version 1.23.2, build 1110ad0

              – therobyouknow
              Mar 25 at 23:25



















            4














            If the above methods aren't working for you, then refer to this answer: https://stackoverflow.com/a/40554985



            curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" > ./docker-compose
            sudo mv ./docker-compose /usr/bin/docker-compose
            sudo chmod +x /usr/bin/docker-compose





            share|improve this answer





















            • 2





              While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review

              – Luuklag
              Jul 19 '18 at 18:03











            • @Luuklag Updated the answer. Thank you for the suggestion

              – Kshitij
              Jul 19 '18 at 18:52











            • It seems to be extremely slow option

              – TeoTN
              Mar 16 at 20:16



















            1














            Here is another oneliner to install the latest version of docker-compose using curl and sed.



            curl -L "https://github.com/docker/compose/releases/download/`curl -fsSLI -o /dev/null -w %{url_effective} https://github.com/docker/compose/releases/latest | sed 's#.*tag/##g' && echo`/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose





            share|improve this answer































              0














              use this from command line: sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose



              Write down the latest release version



              Apply executable permissions to the binary:



              sudo chmod +x /usr/local/bin/docker-compose


              Then test version:



              $ docker-compose --version





              share|improve this answer































                0














                After a lot of looking at ways to perform this I ended up using jq, and hopefully I can expand it to handle other repos beyond Docker-Compose without too much work.



                # If you have jq installed this will automatically find the latest release binary for your architecture and download it
                curl --silent "https://api.github.com/repos/docker/compose/releases/latest" | jq --arg PLATFORM_ARCH "$(echo `uname -s`-`uname -m`)" -r '.assets | select(.name | endswith($PLATFORM_ARCH)).browser_download_url' | xargs sudo curl -L -o /usr/local/bin/docker-compose --url





                share|improve this answer































                  0














                  If you have homebrew you can also install via brew



                  $ brew install docker-compose


                  This is a good way to install on a Mac OS system






                  share|improve this answer
























                    Your Answer






                    StackExchange.ifUsing("editor", function () {
                    StackExchange.using("externalEditor", function () {
                    StackExchange.using("snippets", function () {
                    StackExchange.snippets.init();
                    });
                    });
                    }, "code-snippets");

                    StackExchange.ready(function() {
                    var channelOptions = {
                    tags: "".split(" "),
                    id: "1"
                    };
                    initTagRenderer("".split(" "), "".split(" "), channelOptions);

                    StackExchange.using("externalEditor", function() {
                    // Have to fire editor after snippets, if snippets enabled
                    if (StackExchange.settings.snippets.snippetsEnabled) {
                    StackExchange.using("snippets", function() {
                    createEditor();
                    });
                    }
                    else {
                    createEditor();
                    }
                    });

                    function createEditor() {
                    StackExchange.prepareEditor({
                    heartbeatType: 'answer',
                    autoActivateHeartbeat: false,
                    convertImagesToLinks: true,
                    noModals: true,
                    showLowRepImageUploadWarning: true,
                    reputationToPostImages: 10,
                    bindNavPrevention: true,
                    postfix: "",
                    imageUploader: {
                    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                    allowUrls: true
                    },
                    onDemand: true,
                    discardSelector: ".discard-answer"
                    ,immediatelyShowMarkdownHelp:true
                    });


                    }
                    });














                    draft saved

                    draft discarded


















                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49839028%2fhow-to-upgrade-docker-compose-to-latest-version%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown

























                    8 Answers
                    8






                    active

                    oldest

                    votes








                    8 Answers
                    8






                    active

                    oldest

                    votes









                    active

                    oldest

                    votes






                    active

                    oldest

                    votes









                    30














                    If you want to follow the instructions on the Docker site, you should remove the existing docker-compose with



                    sudo apt-get remove docker-compose


                    then find the newest version on the release page at GitHub or by curling the API if you have jq installed (thanks to dragon788 and frbl for this improvement):



                    VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)


                    Then download and change permissions to your favorite $PATH-accessible location:



                    DESTINATION=/usr/local/bin/docker-compose
                    sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION
                    sudo chmod +x $DESTINATION





                    share|improve this answer





















                    • 1





                      not working for me :/

                      – NotSoShabby
                      Nov 25 '18 at 10:07











                    • Can you give some details about how it's not working?

                      – Eric M. Johnson
                      Nov 27 '18 at 1:38






                    • 1





                      try updating path in /usr/local/bin/docker-compose and then run sudo chmod +x /usr/bin/docker-compose

                      – Raj Kumar Goyal
                      Nov 27 '18 at 8:14








                    • 1





                      No need to move the file. The /usr/local/bin path should be in $PATH already. Just chmod in place. Answer updated to reflect this.

                      – Gold
                      Nov 29 '18 at 1:09
















                    30














                    If you want to follow the instructions on the Docker site, you should remove the existing docker-compose with



                    sudo apt-get remove docker-compose


                    then find the newest version on the release page at GitHub or by curling the API if you have jq installed (thanks to dragon788 and frbl for this improvement):



                    VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)


                    Then download and change permissions to your favorite $PATH-accessible location:



                    DESTINATION=/usr/local/bin/docker-compose
                    sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION
                    sudo chmod +x $DESTINATION





                    share|improve this answer





















                    • 1





                      not working for me :/

                      – NotSoShabby
                      Nov 25 '18 at 10:07











                    • Can you give some details about how it's not working?

                      – Eric M. Johnson
                      Nov 27 '18 at 1:38






                    • 1





                      try updating path in /usr/local/bin/docker-compose and then run sudo chmod +x /usr/bin/docker-compose

                      – Raj Kumar Goyal
                      Nov 27 '18 at 8:14








                    • 1





                      No need to move the file. The /usr/local/bin path should be in $PATH already. Just chmod in place. Answer updated to reflect this.

                      – Gold
                      Nov 29 '18 at 1:09














                    30












                    30








                    30







                    If you want to follow the instructions on the Docker site, you should remove the existing docker-compose with



                    sudo apt-get remove docker-compose


                    then find the newest version on the release page at GitHub or by curling the API if you have jq installed (thanks to dragon788 and frbl for this improvement):



                    VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)


                    Then download and change permissions to your favorite $PATH-accessible location:



                    DESTINATION=/usr/local/bin/docker-compose
                    sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION
                    sudo chmod +x $DESTINATION





                    share|improve this answer















                    If you want to follow the instructions on the Docker site, you should remove the existing docker-compose with



                    sudo apt-get remove docker-compose


                    then find the newest version on the release page at GitHub or by curling the API if you have jq installed (thanks to dragon788 and frbl for this improvement):



                    VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)


                    Then download and change permissions to your favorite $PATH-accessible location:



                    DESTINATION=/usr/local/bin/docker-compose
                    sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION
                    sudo chmod +x $DESTINATION






                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Nov 29 '18 at 1:45

























                    answered Apr 15 '18 at 6:39









                    Eric M. JohnsonEric M. Johnson

                    1,136517




                    1,136517








                    • 1





                      not working for me :/

                      – NotSoShabby
                      Nov 25 '18 at 10:07











                    • Can you give some details about how it's not working?

                      – Eric M. Johnson
                      Nov 27 '18 at 1:38






                    • 1





                      try updating path in /usr/local/bin/docker-compose and then run sudo chmod +x /usr/bin/docker-compose

                      – Raj Kumar Goyal
                      Nov 27 '18 at 8:14








                    • 1





                      No need to move the file. The /usr/local/bin path should be in $PATH already. Just chmod in place. Answer updated to reflect this.

                      – Gold
                      Nov 29 '18 at 1:09














                    • 1





                      not working for me :/

                      – NotSoShabby
                      Nov 25 '18 at 10:07











                    • Can you give some details about how it's not working?

                      – Eric M. Johnson
                      Nov 27 '18 at 1:38






                    • 1





                      try updating path in /usr/local/bin/docker-compose and then run sudo chmod +x /usr/bin/docker-compose

                      – Raj Kumar Goyal
                      Nov 27 '18 at 8:14








                    • 1





                      No need to move the file. The /usr/local/bin path should be in $PATH already. Just chmod in place. Answer updated to reflect this.

                      – Gold
                      Nov 29 '18 at 1:09








                    1




                    1





                    not working for me :/

                    – NotSoShabby
                    Nov 25 '18 at 10:07





                    not working for me :/

                    – NotSoShabby
                    Nov 25 '18 at 10:07













                    Can you give some details about how it's not working?

                    – Eric M. Johnson
                    Nov 27 '18 at 1:38





                    Can you give some details about how it's not working?

                    – Eric M. Johnson
                    Nov 27 '18 at 1:38




                    1




                    1





                    try updating path in /usr/local/bin/docker-compose and then run sudo chmod +x /usr/bin/docker-compose

                    – Raj Kumar Goyal
                    Nov 27 '18 at 8:14







                    try updating path in /usr/local/bin/docker-compose and then run sudo chmod +x /usr/bin/docker-compose

                    – Raj Kumar Goyal
                    Nov 27 '18 at 8:14






                    1




                    1





                    No need to move the file. The /usr/local/bin path should be in $PATH already. Just chmod in place. Answer updated to reflect this.

                    – Gold
                    Nov 29 '18 at 1:09





                    No need to move the file. The /usr/local/bin path should be in $PATH already. Just chmod in place. Answer updated to reflect this.

                    – Gold
                    Nov 29 '18 at 1:09













                    9














                    Based on @eric-johnson's answer, I'm currently using this in a script:



                    #!/bin/bash
                    compose_version=$(curl https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)
                    output='/usr/local/bin/docker-compose'
                    curl -L https://github.com/docker/compose/releases/download/$compose_version/docker-compose-$(uname -s)-$(uname -m) -o $output
                    chmod +x $output
                    echo $(docker-compose --version)


                    it grabs the latest version from the GitHub api.






                    share|improve this answer




























                      9














                      Based on @eric-johnson's answer, I'm currently using this in a script:



                      #!/bin/bash
                      compose_version=$(curl https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)
                      output='/usr/local/bin/docker-compose'
                      curl -L https://github.com/docker/compose/releases/download/$compose_version/docker-compose-$(uname -s)-$(uname -m) -o $output
                      chmod +x $output
                      echo $(docker-compose --version)


                      it grabs the latest version from the GitHub api.






                      share|improve this answer


























                        9












                        9








                        9







                        Based on @eric-johnson's answer, I'm currently using this in a script:



                        #!/bin/bash
                        compose_version=$(curl https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)
                        output='/usr/local/bin/docker-compose'
                        curl -L https://github.com/docker/compose/releases/download/$compose_version/docker-compose-$(uname -s)-$(uname -m) -o $output
                        chmod +x $output
                        echo $(docker-compose --version)


                        it grabs the latest version from the GitHub api.






                        share|improve this answer













                        Based on @eric-johnson's answer, I'm currently using this in a script:



                        #!/bin/bash
                        compose_version=$(curl https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)
                        output='/usr/local/bin/docker-compose'
                        curl -L https://github.com/docker/compose/releases/download/$compose_version/docker-compose-$(uname -s)-$(uname -m) -o $output
                        chmod +x $output
                        echo $(docker-compose --version)


                        it grabs the latest version from the GitHub api.







                        share|improve this answer












                        share|improve this answer



                        share|improve this answer










                        answered Jul 20 '18 at 4:44









                        frblfrbl

                        687710




                        687710























                            8














                            The easiest way to have a permanent and sustainable solution for the Docker Compose installation and the way to upgrade it, is to just use the package manager pip (if you´re on Linux) with:



                            pip install docker-compose


                            I was searching for a good solution for the ugly "how to upgrade to the latest version number"-problem, which appeared after you´ve read the official docs - and just found it occasionally - just have a look at the docker-compose pip package - it should reflect (mostly) the current number of the latest released Docker Compose version.



                            A package manager is always the best solution if it comes to managing software installations! So you just abstract from handling the versions on your own.






                            share|improve this answer
























                            • +1 great answer. Before: I had docker-compose version: docker-compose version 1.21.2, build a133471 So to upgrade to latest non-RC version, I found this to work in order to upgrade: 1) apt install python-pip to install PIP then pip install docker-compose to install the latest and then to check the version: docker-compose --version which gave me: docker-compose version 1.23.2, build 1110ad0

                              – therobyouknow
                              Mar 25 at 23:25
















                            8














                            The easiest way to have a permanent and sustainable solution for the Docker Compose installation and the way to upgrade it, is to just use the package manager pip (if you´re on Linux) with:



                            pip install docker-compose


                            I was searching for a good solution for the ugly "how to upgrade to the latest version number"-problem, which appeared after you´ve read the official docs - and just found it occasionally - just have a look at the docker-compose pip package - it should reflect (mostly) the current number of the latest released Docker Compose version.



                            A package manager is always the best solution if it comes to managing software installations! So you just abstract from handling the versions on your own.






                            share|improve this answer
























                            • +1 great answer. Before: I had docker-compose version: docker-compose version 1.21.2, build a133471 So to upgrade to latest non-RC version, I found this to work in order to upgrade: 1) apt install python-pip to install PIP then pip install docker-compose to install the latest and then to check the version: docker-compose --version which gave me: docker-compose version 1.23.2, build 1110ad0

                              – therobyouknow
                              Mar 25 at 23:25














                            8












                            8








                            8







                            The easiest way to have a permanent and sustainable solution for the Docker Compose installation and the way to upgrade it, is to just use the package manager pip (if you´re on Linux) with:



                            pip install docker-compose


                            I was searching for a good solution for the ugly "how to upgrade to the latest version number"-problem, which appeared after you´ve read the official docs - and just found it occasionally - just have a look at the docker-compose pip package - it should reflect (mostly) the current number of the latest released Docker Compose version.



                            A package manager is always the best solution if it comes to managing software installations! So you just abstract from handling the versions on your own.






                            share|improve this answer













                            The easiest way to have a permanent and sustainable solution for the Docker Compose installation and the way to upgrade it, is to just use the package manager pip (if you´re on Linux) with:



                            pip install docker-compose


                            I was searching for a good solution for the ugly "how to upgrade to the latest version number"-problem, which appeared after you´ve read the official docs - and just found it occasionally - just have a look at the docker-compose pip package - it should reflect (mostly) the current number of the latest released Docker Compose version.



                            A package manager is always the best solution if it comes to managing software installations! So you just abstract from handling the versions on your own.







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered May 21 '18 at 18:44









                            jonashacktjonashackt

                            1,8311432




                            1,8311432













                            • +1 great answer. Before: I had docker-compose version: docker-compose version 1.21.2, build a133471 So to upgrade to latest non-RC version, I found this to work in order to upgrade: 1) apt install python-pip to install PIP then pip install docker-compose to install the latest and then to check the version: docker-compose --version which gave me: docker-compose version 1.23.2, build 1110ad0

                              – therobyouknow
                              Mar 25 at 23:25



















                            • +1 great answer. Before: I had docker-compose version: docker-compose version 1.21.2, build a133471 So to upgrade to latest non-RC version, I found this to work in order to upgrade: 1) apt install python-pip to install PIP then pip install docker-compose to install the latest and then to check the version: docker-compose --version which gave me: docker-compose version 1.23.2, build 1110ad0

                              – therobyouknow
                              Mar 25 at 23:25

















                            +1 great answer. Before: I had docker-compose version: docker-compose version 1.21.2, build a133471 So to upgrade to latest non-RC version, I found this to work in order to upgrade: 1) apt install python-pip to install PIP then pip install docker-compose to install the latest and then to check the version: docker-compose --version which gave me: docker-compose version 1.23.2, build 1110ad0

                            – therobyouknow
                            Mar 25 at 23:25





                            +1 great answer. Before: I had docker-compose version: docker-compose version 1.21.2, build a133471 So to upgrade to latest non-RC version, I found this to work in order to upgrade: 1) apt install python-pip to install PIP then pip install docker-compose to install the latest and then to check the version: docker-compose --version which gave me: docker-compose version 1.23.2, build 1110ad0

                            – therobyouknow
                            Mar 25 at 23:25











                            4














                            If the above methods aren't working for you, then refer to this answer: https://stackoverflow.com/a/40554985



                            curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" > ./docker-compose
                            sudo mv ./docker-compose /usr/bin/docker-compose
                            sudo chmod +x /usr/bin/docker-compose





                            share|improve this answer





















                            • 2





                              While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review

                              – Luuklag
                              Jul 19 '18 at 18:03











                            • @Luuklag Updated the answer. Thank you for the suggestion

                              – Kshitij
                              Jul 19 '18 at 18:52











                            • It seems to be extremely slow option

                              – TeoTN
                              Mar 16 at 20:16
















                            4














                            If the above methods aren't working for you, then refer to this answer: https://stackoverflow.com/a/40554985



                            curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" > ./docker-compose
                            sudo mv ./docker-compose /usr/bin/docker-compose
                            sudo chmod +x /usr/bin/docker-compose





                            share|improve this answer





















                            • 2





                              While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review

                              – Luuklag
                              Jul 19 '18 at 18:03











                            • @Luuklag Updated the answer. Thank you for the suggestion

                              – Kshitij
                              Jul 19 '18 at 18:52











                            • It seems to be extremely slow option

                              – TeoTN
                              Mar 16 at 20:16














                            4












                            4








                            4







                            If the above methods aren't working for you, then refer to this answer: https://stackoverflow.com/a/40554985



                            curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" > ./docker-compose
                            sudo mv ./docker-compose /usr/bin/docker-compose
                            sudo chmod +x /usr/bin/docker-compose





                            share|improve this answer















                            If the above methods aren't working for you, then refer to this answer: https://stackoverflow.com/a/40554985



                            curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" > ./docker-compose
                            sudo mv ./docker-compose /usr/bin/docker-compose
                            sudo chmod +x /usr/bin/docker-compose






                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Jul 19 '18 at 18:50

























                            answered Jul 19 '18 at 17:35









                            KshitijKshitij

                            3261310




                            3261310








                            • 2





                              While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review

                              – Luuklag
                              Jul 19 '18 at 18:03











                            • @Luuklag Updated the answer. Thank you for the suggestion

                              – Kshitij
                              Jul 19 '18 at 18:52











                            • It seems to be extremely slow option

                              – TeoTN
                              Mar 16 at 20:16














                            • 2





                              While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review

                              – Luuklag
                              Jul 19 '18 at 18:03











                            • @Luuklag Updated the answer. Thank you for the suggestion

                              – Kshitij
                              Jul 19 '18 at 18:52











                            • It seems to be extremely slow option

                              – TeoTN
                              Mar 16 at 20:16








                            2




                            2





                            While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review

                            – Luuklag
                            Jul 19 '18 at 18:03





                            While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review

                            – Luuklag
                            Jul 19 '18 at 18:03













                            @Luuklag Updated the answer. Thank you for the suggestion

                            – Kshitij
                            Jul 19 '18 at 18:52





                            @Luuklag Updated the answer. Thank you for the suggestion

                            – Kshitij
                            Jul 19 '18 at 18:52













                            It seems to be extremely slow option

                            – TeoTN
                            Mar 16 at 20:16





                            It seems to be extremely slow option

                            – TeoTN
                            Mar 16 at 20:16











                            1














                            Here is another oneliner to install the latest version of docker-compose using curl and sed.



                            curl -L "https://github.com/docker/compose/releases/download/`curl -fsSLI -o /dev/null -w %{url_effective} https://github.com/docker/compose/releases/latest | sed 's#.*tag/##g' && echo`/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose





                            share|improve this answer




























                              1














                              Here is another oneliner to install the latest version of docker-compose using curl and sed.



                              curl -L "https://github.com/docker/compose/releases/download/`curl -fsSLI -o /dev/null -w %{url_effective} https://github.com/docker/compose/releases/latest | sed 's#.*tag/##g' && echo`/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose





                              share|improve this answer


























                                1












                                1








                                1







                                Here is another oneliner to install the latest version of docker-compose using curl and sed.



                                curl -L "https://github.com/docker/compose/releases/download/`curl -fsSLI -o /dev/null -w %{url_effective} https://github.com/docker/compose/releases/latest | sed 's#.*tag/##g' && echo`/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose





                                share|improve this answer













                                Here is another oneliner to install the latest version of docker-compose using curl and sed.



                                curl -L "https://github.com/docker/compose/releases/download/`curl -fsSLI -o /dev/null -w %{url_effective} https://github.com/docker/compose/releases/latest | sed 's#.*tag/##g' && echo`/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose && chmod +x /usr/local/bin/docker-compose






                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered Jan 24 at 6:46









                                Jakob ErikssonJakob Eriksson

                                16.4k11728




                                16.4k11728























                                    0














                                    use this from command line: sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose



                                    Write down the latest release version



                                    Apply executable permissions to the binary:



                                    sudo chmod +x /usr/local/bin/docker-compose


                                    Then test version:



                                    $ docker-compose --version





                                    share|improve this answer




























                                      0














                                      use this from command line: sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose



                                      Write down the latest release version



                                      Apply executable permissions to the binary:



                                      sudo chmod +x /usr/local/bin/docker-compose


                                      Then test version:



                                      $ docker-compose --version





                                      share|improve this answer


























                                        0












                                        0








                                        0







                                        use this from command line: sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose



                                        Write down the latest release version



                                        Apply executable permissions to the binary:



                                        sudo chmod +x /usr/local/bin/docker-compose


                                        Then test version:



                                        $ docker-compose --version





                                        share|improve this answer













                                        use this from command line: sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose



                                        Write down the latest release version



                                        Apply executable permissions to the binary:



                                        sudo chmod +x /usr/local/bin/docker-compose


                                        Then test version:



                                        $ docker-compose --version






                                        share|improve this answer












                                        share|improve this answer



                                        share|improve this answer










                                        answered Sep 17 '18 at 20:07









                                        Md. Tanvir RahamanMd. Tanvir Rahaman

                                        11




                                        11























                                            0














                                            After a lot of looking at ways to perform this I ended up using jq, and hopefully I can expand it to handle other repos beyond Docker-Compose without too much work.



                                            # If you have jq installed this will automatically find the latest release binary for your architecture and download it
                                            curl --silent "https://api.github.com/repos/docker/compose/releases/latest" | jq --arg PLATFORM_ARCH "$(echo `uname -s`-`uname -m`)" -r '.assets | select(.name | endswith($PLATFORM_ARCH)).browser_download_url' | xargs sudo curl -L -o /usr/local/bin/docker-compose --url





                                            share|improve this answer




























                                              0














                                              After a lot of looking at ways to perform this I ended up using jq, and hopefully I can expand it to handle other repos beyond Docker-Compose without too much work.



                                              # If you have jq installed this will automatically find the latest release binary for your architecture and download it
                                              curl --silent "https://api.github.com/repos/docker/compose/releases/latest" | jq --arg PLATFORM_ARCH "$(echo `uname -s`-`uname -m`)" -r '.assets | select(.name | endswith($PLATFORM_ARCH)).browser_download_url' | xargs sudo curl -L -o /usr/local/bin/docker-compose --url





                                              share|improve this answer


























                                                0












                                                0








                                                0







                                                After a lot of looking at ways to perform this I ended up using jq, and hopefully I can expand it to handle other repos beyond Docker-Compose without too much work.



                                                # If you have jq installed this will automatically find the latest release binary for your architecture and download it
                                                curl --silent "https://api.github.com/repos/docker/compose/releases/latest" | jq --arg PLATFORM_ARCH "$(echo `uname -s`-`uname -m`)" -r '.assets | select(.name | endswith($PLATFORM_ARCH)).browser_download_url' | xargs sudo curl -L -o /usr/local/bin/docker-compose --url





                                                share|improve this answer













                                                After a lot of looking at ways to perform this I ended up using jq, and hopefully I can expand it to handle other repos beyond Docker-Compose without too much work.



                                                # If you have jq installed this will automatically find the latest release binary for your architecture and download it
                                                curl --silent "https://api.github.com/repos/docker/compose/releases/latest" | jq --arg PLATFORM_ARCH "$(echo `uname -s`-`uname -m`)" -r '.assets | select(.name | endswith($PLATFORM_ARCH)).browser_download_url' | xargs sudo curl -L -o /usr/local/bin/docker-compose --url






                                                share|improve this answer












                                                share|improve this answer



                                                share|improve this answer










                                                answered Sep 20 '18 at 16:53









                                                dragon788dragon788

                                                1,2991229




                                                1,2991229























                                                    0














                                                    If you have homebrew you can also install via brew



                                                    $ brew install docker-compose


                                                    This is a good way to install on a Mac OS system






                                                    share|improve this answer




























                                                      0














                                                      If you have homebrew you can also install via brew



                                                      $ brew install docker-compose


                                                      This is a good way to install on a Mac OS system






                                                      share|improve this answer


























                                                        0












                                                        0








                                                        0







                                                        If you have homebrew you can also install via brew



                                                        $ brew install docker-compose


                                                        This is a good way to install on a Mac OS system






                                                        share|improve this answer













                                                        If you have homebrew you can also install via brew



                                                        $ brew install docker-compose


                                                        This is a good way to install on a Mac OS system







                                                        share|improve this answer












                                                        share|improve this answer



                                                        share|improve this answer










                                                        answered Oct 25 '18 at 14:23









                                                        Kristian MandrupKristian Mandrup

                                                        4416




                                                        4416






























                                                            draft saved

                                                            draft discarded




















































                                                            Thanks for contributing an answer to Stack Overflow!


                                                            • Please be sure to answer the question. Provide details and share your research!

                                                            But avoid



                                                            • Asking for help, clarification, or responding to other answers.

                                                            • Making statements based on opinion; back them up with references or personal experience.


                                                            To learn more, see our tips on writing great answers.




                                                            draft saved


                                                            draft discarded














                                                            StackExchange.ready(
                                                            function () {
                                                            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f49839028%2fhow-to-upgrade-docker-compose-to-latest-version%23new-answer', 'question_page');
                                                            }
                                                            );

                                                            Post as a guest















                                                            Required, but never shown





















































                                                            Required, but never shown














                                                            Required, but never shown












                                                            Required, but never shown







                                                            Required, but never shown

































                                                            Required, but never shown














                                                            Required, but never shown












                                                            Required, but never shown







                                                            Required, but never shown







                                                            Popular posts from this blog

                                                            Contact image not getting when fetch all contact list from iPhone by CNContact

                                                            count number of partitions of a set with n elements into k subsets

                                                            A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks