diff --git a/start.sh b/start.sh index 6c3835c..c5221e1 100644 --- a/start.sh +++ b/start.sh @@ -1,10 +1,3 @@ -# Build image -docker build -t ngxway . -if [ $? -ne 0 ]; then - echo -e ">>>>>>>>Start failure: failed to build<<<<<<<<" - exit 1 -fi - # Handle container containerCount=0 for file in $(docker container ls -f name=ngxwayContainer -q) @@ -16,6 +9,17 @@ if [ $containerCount -ne 0 ]; then exit 1 fi +# Pull without password +git config --global credential.helper store +git pull + +# Build image +docker build -t ngxway . +if [ $? -ne 0 ]; then + echo -e ">>>>>>>>Start failure: failed to build<<<<<<<<" + exit 1 +fi + # Run container docker run --name ngxwayContainer -d -p 127.0.0.1:8090:8090 -v /tmp/logs:/dist/logs/ ngxway if [ $? -ne 0 ]; then