From 6fa7248adafbb68398ea8238d106b4fade48b07f Mon Sep 17 00:00:00 2001 From: lvsi <15239928381@163.com> Date: Mon, 28 Nov 2022 14:55:35 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=9E=84=E5=BB=BA?= =?UTF-8?q?=E9=95=9C=E5=83=8F=E5=92=8Ccontainer=E6=B8=85=E7=90=86=E9=A1=BA?= =?UTF-8?q?=E5=BA=8F=E5=AF=BC=E8=87=B4=E7=9A=84bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- start.sh | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) 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