docker-machine and direnv
If you have a project whose development environment is based on Docker and uses docker-machine, using direnv could save you some repetitive manual configuration.
I had a bit of trouble figuring this out from scratch (it turned out to actually be deceptively simple), so I’m sharing the envrc here for posterity.
# ignore errors here, which are usually due to machine already running docker-machine start default || true eval $(docker-machine env default) export DOCKER_MACHINE_IP=$(docker-machine ip default)













