I have downloaded docker toolbox to learn docker and I have started with docker compose topic. I had run few docker-compose command and next time when I restart the docker CLI(here docker quickstart terminal) everytime I have to run below docker-compose install commands

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

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

Is there any way to permanently install docker compose.

  • 1
    Pooja, you need to give enough details for people to reproduce your issue. For example. What is the operating system of your machine? Do you somehow always start new docker machine so the changes do not persist? If you do docker-machine ls what is it that you see? Maybe you simply need to work in the previous docker machine and not start a new one. But this would be revealed if you gave more details on what exactly you do step by step. – Jiri Klouda Aug 1 at 19:48

When installing docker on windows or mac, there is a virtual machine called 'docker machine' that runs Linux OS. Docker has a command docker-machine used to start this virtual machine using docker-machine start. It is likely that every time you restart the toolbox, you start a new VM with new fresh copy of the OS. If you do docker-machine ls you should see multiple docker machines, one of them running. If instead on restart you always start the same docker-machine, it will have the previous changes, like previously installed packages, including the docker compose. You can give docker-machine start <arg> with the name of the docker machine you want to start, which should be always the same one.

  • This answer is just an educated guess based on incomplete information, but would be consistent with the symptoms and experience level of the user. – Jiri Klouda Aug 1 at 20:13

According to this documentation, Docker Toolbox is a legacy product and one should use docker-for-X.

Legacy desktop solution. Docker Toolbox is for older Mac and Windows systems that do not meet the requirements of Docker for Mac and Docker for Windows. We recommend updating to the newer applications, if possible.

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.