Last active
          December 9, 2018 22:40 
        
      - 
      
 - 
        
Save DzeryCZ/20706dd2ecb8669d17bcd74dc60fa3b8 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
DzeryCZ revised this gist
Dec 9, 2018 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -5,9 +5,7 @@ Add this to ~/.bashrc: function docker-machine() { if [ $1 == "env" ]; then docker-machine.exe $1 $2 --shell bash | sed 's/C:/\/c/' | sed 's/\\/\//g' | sed 's/"//g' else docker-machine.exe "$@" fi  - 
        
DzeryCZ revised this gist
Oct 24, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Add this to ~/.bashrc: if [ $1 == "env" ]; then docker-machine.exe $1 $2 --shell bash | sed 's/C:/\/c/' | sed 's/\\/\//g' | sed 's:#.*$::g' | sed 's/"//g' printf "# Run this command to configure your shell:\n" printf "# eval \"\$(docker-machine $1 $2)\"\n" else docker-machine.exe "$@" fi  - 
        
DzeryCZ revised this gist
Oct 24, 2018 . 1 changed file with 5 additions and 4 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,18 +2,19 @@ Add this to ~/.bashrc: function docker-machine() { if [ $1 == "env" ]; then docker-machine.exe $1 $2 --shell bash | sed 's/C:/\/c/' | sed 's/\\/\//g' | sed 's:#.*$::g' | sed 's/"//g' printf "# Run this command to configure your shell:\n" printf "# eval \"\$(docker-machine $1 $2})\"\n" else docker-machine.exe "$@" fi } export -f docker-machine In case you have not mounted C drive to root folder, change `s/C:/\/c/` to `s/C:/\/mnt\/c/` in the script above. Use it like standard docker-machine  - 
        
DzeryCZ renamed this gist
Sep 6, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,4 @@ `docker-machine` Doesn't work properly inside of WSL, this function makes it work. Add this to ~/.bashrc:  - 
        
DzeryCZ revised this gist
Sep 6, 2018 . 2 changed files with 19 additions and 14 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +0,0 @@ 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,19 @@ `docker-machine` Doesnt work properly inside of WSL, this alias makes it work. Add this to ~/.bashrc: alias windows_docker_machine="/c/Program\ Files/Docker/Docker/resources/bin/docker-machine.exe" function docker-machine() { if [ $1 == "env" ]; then $(windows_docker_machine $1 $2 --shell bash | sed 's/C:/\/mnt\/c/' | sed 's/\\/\//g' | sed 's:#.*$::g' | sed 's/"//g' ) else windows_docker_machine "$@" fi } export -f docker-machine In case you have mounted C drive to root folder, change `s/C:/\/mnt\/c/` to `s/C:/\/c/` in the script above. Use it like standard docker-machine  - 
        
DzeryCZ revised this gist
Aug 7, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ Add alias to ~/.bashrc: $(docker-machine.exe env $1 --shell bash | sed 's/C:/\/mnt\/c/' | sed 's/\\/\//g' | sed 's:#.*$::g' | sed 's/"//g' ) } In case you have mounted C drive to root folder, change `s/C:/\/mnt\/c/` to `s/C:/\/c/` in the script above. Use it like this:  - 
        
DzeryCZ revised this gist
Aug 7, 2018 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,8 @@ Add alias to ~/.bashrc: $(docker-machine.exe env $1 --shell bash | sed 's/C:/\/mnt\/c/' | sed 's/\\/\//g' | sed 's:#.*$::g' | sed 's/"//g' ) } In case you have mounted C drive to root folder, change `s/C:/\/mnt\/c/` to `s/C:/\/c/` Use it like this: docker-machine-env default  - 
        
DzeryCZ revised this gist
Apr 26, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -9,4 +9,4 @@ Add alias to ~/.bashrc: Use it like this: docker-machine-env default  - 
        
DzeryCZ created this gist
Apr 26, 2018 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ `docker-machine env` Doesnt work properly inside of WSL, this alias makes it work. Add alias to ~/.bashrc: docker-machine-env() { $(docker-machine.exe env $1 --shell bash | sed 's/C:/\/mnt\/c/' | sed 's/\\/\//g' | sed 's:#.*$::g' | sed 's/"//g' ) } Use it like this: docker-machine-env default