Created
March 4, 2019 10:00
-
-
Save dannyockilson/af48abf49a8afebc12c526e6e5c02b09 to your computer and use it in GitHub Desktop.
Running static sites easily in docker
This file contains 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
alias static-this='docker run --rm -v `pwd`:/usr/share/nginx/html -p 80:80 -d nginx:alpine' | |
function static_that() { | |
docker run --rm -v `pwd`/${1}:/usr/share/nginx/html -p 80:80 -d nginx:alpine | |
} | |
alias static-that='static_that' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Usage:
static-this
- serves current directory via nginx docker containerstatic-that path/to/folder
- serves specified directory via nginx docker container