Skip to content

Instantly share code, notes, and snippets.

@klesouza
Last active April 20, 2017 11:07
Show Gist options
  • Save klesouza/934140f6da43cf5f57a3030e45d2e890 to your computer and use it in GitHub Desktop.
Save klesouza/934140f6da43cf5f57a3030e45d2e890 to your computer and use it in GitHub Desktop.
BAT to start docker machine
@echo off
FOR /f "tokens=4" %%i IN ('docker-machine ls --filter "NAME=default"') DO (
IF "%%i"=="Stopped" (
docker-machine start default
@FOR /f "tokens=*" %%j IN ('docker-machine env default') DO @%%j
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment