Created
May 14, 2015 02:08
-
-
Save srgrn/8cfdf1c4ad2642925e54 to your computer and use it in GitHub Desktop.
docker-machine-set-env-on-cmd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 1. open cmd | |
| 2. ensure your env is up | |
| `docker-machine ls` | |
| 3. run `set DOCKERENV='your env name'` | |
| 4. run the following command ` echo @echo off > %TEMP%\%DOCKERENV%.bat && ( docker-machine.exe env %DOCKERENV% | sed 's/export/set/' | |
| | sed 's,\\\\\\\\,\\\\,g' | sed 's,#,rem,g') >> %TEMP%\%DOCKERENV%.bat && %TEMP%\%DOCKERENV%.bat %% del | |
| %TEMP%\%DOCKERENV%.bat` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment