Last active
November 22, 2024 21:03
-
-
Save snehesht/5cfa5885208a633e4826 to your computer and use it in GitHub Desktop.
Automates the process of switching the docker-machine environments
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
:: Author: Snehesh Thalapaneni | |
:: Description: Automates the process of switching the docker-machine environments. Just type in the machine name the script will setup the environment for you. | |
:: Compatable with Windows x86, x64 systems | |
@echo off | |
if [%1]==[] goto help | |
echo @echo off >> temp_config.bat | |
docker-machine env --shell cmd %1 | findstr /v # >> temp_config.bat | |
echo exit /B >> temp_config.bat | |
call temp_config.bat | |
del temp_config.bat | |
echo "docker-machine environment is setup." | |
GOTO:EOF | |
:help | |
@echo Usage: %0 DOCKER_MACHINE_NAME | |
@echo example: run " docker-machine ls " and you'll find the docker-machine-name | |
EXIT /B 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment