rofls
rofls

Reputation: 5115

How can I use docker-compose locally after setting up a docker-machine host?

I setup docker-machine to administer a site on digital ocean. That all worked nicely, but now I can't use docker-compose locally: it starts the docker containers on the remote server. Is there a way to specify not to do that?

Upvotes: 0

Views: 46

Answers (1)

johnharris85
johnharris85

Reputation: 18926

When you use docker-machine it will set your DOCKER_HOST environment variable, that's where your docker client will point to and run all the commands. You either need to do eval $(docker-machine env -u) to unset the environment variables back to your local, or just export DOCKER_HOST to point back to your local before you run docker-compose.

Upvotes: 2

Related Questions