Created
July 11, 2015 00:12
-
-
Save ezmac/bf976ebff45388473713 to your computer and use it in GitHub Desktop.
docker run script for slightly less annoying container dev.
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
#!/bin/bash | |
pwd=$(printf '%q\n' "${PWD##*/}") | |
if [ -z $env ]; then | |
echo "PROD" | |
#prod use absolute paths here | |
docker run --name $pwd -i -t -p 80:80 -p 443:443 -v /data/logs:/data/logs:rw -v /data/containers/docker-nginx-front/config/:/data/config/:rw $pwd | |
elif [[ $env="dev" ]]; then | |
#dev | |
echo $env | |
docker run --name $pwd -i -t -p 8088:80 -v `pwd`/logs/:/data/logs/:rw -v `pwd`/config/:/data/config/:rw -v `pwd`/www:/data/www:rw $pwd | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment