sergeycherepanov / homebrew-docker-virtualbox

Docker workaround for Ryzentosh (AMD based Hackintosh)
208 stars 19 forks source link

Allows docker-machine to switch to other machines #16

Closed Jasonzj closed 3 years ago

Jasonzj commented 3 years ago

Hey, Thanks for this script, it is very helpful for me!

I've added some remote machines through docker-machine and tried to use eval $(docker-machine env xxx) to switch machines but it didn't seem to work. After some digging, I've noticed that the script uses source /tmp/docker-virtualbox.env to export the default machine env every time the docker command is called.

I‘ve added the judgment of the environment to identify whether the machine is activated so that the script can source other machines env and docker-machine can active other machines normally.