niantuo il y a 3 semaines
Parent
commit
f440f1e4e5
2 fichiers modifiés avec 5 ajouts et 2 suppressions
  1. 4 1
      build-nginx-with-ui.sh
  2. 1 1
      docker/Dockerfile-with-nginx

+ 4 - 1
build-nginx-with-ui.sh

@@ -1,3 +1,6 @@
 #/usr/bin/sh
+
+ver=$(date +%y%m%d%H%M)
+
 export DOCKER_BUILDKIT=1
-docker build . -f docker/Dockerfile-with-nginx  -t registry.cn-hangzhou.aliyuncs.com/tuon-pub/nginx-with-ui:latest
+docker build . -f docker/Dockerfile-with-nginx  -t registry.cn-hangzhou.aliyuncs.com/tuon-pub/nginx-with-ui:$ver

+ 1 - 1
docker/Dockerfile-with-nginx

@@ -9,7 +9,7 @@ RUN go env -w GOPROXY=https://goproxy.cn,direct
 RUN --mount=type=cache,target=/go --mount=type=cache,target=/root/.cache/go-build \
     GOODS=${GOODS} GOARCH=${GOARCH}  go build -o /app/app  app.go
 
-FROM nginx:1.25.1
+FROM registry.cn-hangzhou.aliyuncs.com/tuon-pub/nginx:1.25.1
 
 WORKDIR /app
 COPY --from=builder /app/app /app