Docker Community Forums

Share and learn in the Docker community.

How do I load docker environment variables in open terminal session OS X


(Mike Ebinum) #1

Expected behaviour

After installing Docker on Mac, I should be able to use docker in an already open terminal session

Actual behaviour

Only new shell sessions, recognise docker

Information

`

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

  • OSX 10.11.12

Any idea on ow to solve this?


(Justin Cormack) #2

There are no environment variables that need to be set.

It sounds like you might have some set, or an alias, or an old hash, maybe look at env | grep DOCKER to see if you have any variables set, try unalias docker and hash -d docker to see if that helps.


(Everett Toews) #3

You can also do an

unset ${!DOCKER_*}


(Frenchben) #4

To be provide yet another solution: docker-machine env -u


(Mike Ebinum) #5

awesome thanks for the solutions guys