Last active
August 12, 2017 20:35
-
-
Save douglampe/440c3b5b6ce3cf8386e21f3a02651962 to your computer and use it in GitHub Desktop.
Bash script to rebuild and run docker image from content in ~/app/publish.tar.gz
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
# Note: Assumes dockerfile is in ~/app and content is in ~/app/publish.tar.gz | |
proj=$1 | |
cd ~/app | |
docker rm $(docker stop $(docker ps -a -q --filter ancestor=$proj --format="{{.ID}}")) | |
rm -rf publish | |
tar -xvzf publish.tar.gz | |
docker build -t $proj . | |
docker run -d -p 80:5000 $proj |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment