From e32cce111d91d460f84163f95ab2701deb1415ff Mon Sep 17 00:00:00 2001 From: Echo <1711788888@qq.com> Date: Sun, 31 Mar 2024 04:10:36 +0800 Subject: [PATCH] =?UTF-8?q?:art:=20=E4=BF=AE=E6=94=B9dockerfile?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 57c16ad..42ec7e2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:alpine as builder +FROM registry.cn-hangzhou.aliyuncs.com/hyxc/golang:alpine-1.18 as builder WORKDIR /go/src/miniapp COPY . . @@ -10,7 +10,7 @@ RUN go env -w GO111MODULE=on \ && go mod tidy \ && go build -o server . -FROM alpine:latest +FROM registry.cn-hangzhou.aliyuncs.com/hyxc/alpine:3.13.6 as runner WORKDIR /go/src/miniapp COPY --from=0 /go/src/miniapp/server ./ @@ -18,5 +18,7 @@ COPY --from=0 /go/src/miniapp/resource ./resource/ COPY --from=0 /go/src/miniapp/docker/config.docker.yaml ./docker/ COPY --from=0 /go/src/miniapp/docker ./ +RUN /bin/cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime RUN echo "Asia/Shanghai" > /etc/timezone + EXPOSE 8888 ENTRYPOINT ./server -c docker/config.docker.yaml