<p>When installing docker on windows or mac, there is a virtual machine called 'docker machine' that runs Linux OS. Docker has a command <code>docker-machine</code> used to start this virtual machine using <code>docker-machine start</code>. 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 <code>docker-machine ls</code> 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 <code>docker-machine start &lt;arg&gt;</code> with the name of the docker machine you want to start, which should be always the same one.</p>

CC BY-SA 4.0
2018-08-01T20:13:08.227Z
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
CC BY-SA 4.0
2018-08-01T20:10:34.123Z
2018-08-01T20:10:34.123Z
Jiri Klouda
<p><a href="https://docs.docker.com/toolbox/toolbox_install_windows/" rel="nofollow noreferrer">According to this documentation</a>, Docker Toolbox is a legacy product and one should use docker-for-X.</p>

<blockquote>
  <p>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.</p>
</blockquote>

CC BY-SA 4.0
2018-08-03T11:09:53.030Z
2018-08-03T11:09:53.030Z
030
<p>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 </p>

<pre><code>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
</code></pre>

<p>Is there any way to permanently install docker compose.</p>

CC BY-SA 4.0
2018-08-01T19:48:47.660Z
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
CC BY-SA 4.0
2019-12-23T08:37:50.773Z
Could you indicate whether you solved the issue?
030
<docker><docker-compose>
Is Docker compose installation required everytime I start a new session on docker CLI
Pooja Raja
# Is Docker compose installation required everytime I start a new session on docker CLI

(Asked by: username_0 on 2018-07-23)

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.

**Tags:** docker, docker-compose

> **Comments:**
> **username_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.  
> **username_2**: Could you indicate whether you solved the issue?  

---

## 2 answers

### Answer by username_1 on 2018-08-01. Score: 2

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`  with the name of the docker machine you want to start, which should be always the same one.

> **Comments:**
> **username_1**: This answer is just an educated guess based on incomplete information, but would be consistent with the symptoms and experience level of the user.  

---

### Answer by username_2 on 2018-08-03. Score: 1

[According to this documentation](https://docs.docker.com/toolbox/toolbox_install_windows/), 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.


---

