简体   繁体   中英

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?

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM