Last active
August 4, 2017 00:02
-
-
Save Bevilacqua/fab64a323bad3fecdcda59725ff8147d to your computer and use it in GitHub Desktop.
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 | |
if [ $# -lt 2 ] | |
then | |
echo "Usage: ./serpico_setup GIT_USERNAME GIT_PASSWORD" | |
exit | |
fi | |
curl https://gist.githubusercontent.com/Bevilacqua/5754480c2af1e1d222b93c82402533f7/raw/Dockerfile > Dockerfile | |
docker build --build-arg GIT_USERNAME=$1 --build-arg GIT_TOKEN=$2 --no-cache -t serpico . | |
clear | |
read -r -p "Would you like to initialize the db. If you choose no you should have a db/master.db in the current directory. [y/N] " response | |
if [[ $response =~ ^([yY][eE][sS]|[yY])$ ]] | |
then | |
echo "Creating from blank" | |
docker run -itd serpico > container_id | |
docker cp `cat container_id`:/Serpico/db . | |
docker kill `cat container_id` | |
fi | |
echo "RUN WITH: 'docker run -itv `pwd`/db:/Serpico/db -p 443:8443 serpico'" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment