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

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?

1 Like

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.

You can also do an

unset ${!DOCKER_*}

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

awesome thanks for the solutions guys