Last active
April 19, 2020 20:38
-
-
Save jmmaranan/af06216a7bf9daad61435be9e0670992 to your computer and use it in GitHub Desktop.
Windows docker run swagger
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
:: Credits from Go-Swagger itself: https://goswagger.io/install.html#for-windows-users | |
:: Same approach can be used for other Windows Host + Linux Containers, | |
:: which can completely replace some development setup command line tools. | |
:: | |
:: `--rm` - eliminates the need for a lot of dangling containers each time the command script is run. | |
:: | |
:: The `-v %CD%:<container path>` then `-w <that same container path>` makes the current directory | |
:: in the host universally accessible to the container. | |
:: | |
:: `%*` - this accepts any param after the docker image | |
@echo off | |
echo. | |
docker run --rm -it --env GOPATH=/go -v %CD%:/go/src -w /go/src quay.io/goswagger/swagger %* |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment