summaryrefslogtreecommitdiff
path: root/docker-run.sh
diff options
context:
space:
mode:
Diffstat (limited to 'docker-run.sh')
-rwxr-xr-xdocker-run.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/docker-run.sh b/docker-run.sh
index c6b10df..b94566b 100755
--- a/docker-run.sh
+++ b/docker-run.sh
@@ -1 +1,6 @@
-docker run -it -v $PWD/www:/usr/share/nginx/html:ro -p 80:80 nginx:latest
+FLAG=-it
+if [ "$1" == "-d" ]; then
+ FLAG="-d"
+fi
+
+docker run $FLAG -v $PWD/www:/usr/share/nginx/html:ro -p 80:80 nginx:latest