niantuo 3 weeks ago
parent
commit
f440f1e4e5
2 changed files with 5 additions and 2 deletions
  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