HiveBrain v1.2.0
Get Started
← Back to all entries
patterndockerMinor

Is Docker compose installation required everytime I start a new session on docker CLI

Submitted by: @import:stackexchange-devops··
0
Viewed 0 times
newdockerinstallationcomposeeverytimestartsessionclirequired

Problem

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.

Solution

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.

Context

StackExchange DevOps Q#4584, answer score: 2

Revisions (0)

No revisions yet.