Last active
December 24, 2017 08:43
-
-
Save knight42/c838237e8f8757ae31e635de68da3563 to your computer and use it in GitHub Desktop.
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
| #!/bin/bash | |
| SWAGGER_DOCS_PORT=${SWAGGER_DOCS_PORT:-8080} | |
| d=$(mktemp -d) | |
| cd $d || exit 1 | |
| wget -q https://raw.githubusercontent.com/moby/moby/master/api/swagger.yaml | |
| docker run --rm -tid -v "$PWD/swagger.yaml":/usr/share/nginx/html/swagger.yaml \ | |
| -e 'REDOC_OPTIONS=hide-hostname="true" lazy-rendering' \ | |
| -p $SWAGGER_DOCS_PORT:80 \ | |
| bfirsh/redoc:1.6.2 | |
| echo "Serving on http://127.0.0.1:$SWAGGER_DOCS_PORT" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment