Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to start docker-machine on OSX?

I've installed and use docker for the first time yesterday,

Everything was working properly, but yesterday night I've shutdown my computer.

Today I start it and I wanted to work on my docker app, But when I try to run it like

docker run -d -p 8080:8080 container/app

I got the error :

docker: Cannot connect to the Docker daemon. Is the docker daemon running on this host?.

But I can't find how to launch docker again...

Ideas ?

EDIT :

eval "$(docker-machine env default)"

result:

Error checking TLS connection: Host is not running

like image 335
F4Ke Avatar asked Apr 26 '16 08:04

F4Ke


People also ask

What is Docker machine on Mac?

Docker Machine was the first approach to run Docker on either Mac or Windows. It is essentially a set of CLI tools that start a boot2docker virtual machine inside a provided hypervisor (like VirtualBox, Parallels, and VMWare).


1 Answers

The docker-machine env default command won't work if the "default" machine is not running.

You can run the docker-machine ls command, which should give you a list of machines that are configured, and their current status (running, stopped).

If a machine is stopped, run docker-machine start <name-of-machine>. After that you should be able to set the environment variables using

eval "$(docker-machine env default)"

please read the documentation at https://docs.docker.com/machine/overview for more details

like image 67
thaJeztah Avatar answered Oct 15 '22 04:10

thaJeztah