正在显示
1 个修改的文件
包含
5 行增加
和
1 行删除
@@ -13,7 +13,11 @@ RUN go mod tidy | @@ -13,7 +13,11 @@ RUN go mod tidy | ||
13 | RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -o godevp . | 13 | RUN GOOS=linux CGO_ENABLED=0 go build -ldflags="-s -w" -o godevp . |
14 | 14 | ||
15 | FROM alpine:latest | 15 | FROM alpine:latest |
16 | -RUN ["ln","-sf","/usr/share/zoneinfo/Asia/Shanghai","/etc/localtime"] | 16 | +RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories \ |
17 | + && apk add --no-cache tzdata \ | ||
18 | + && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ | ||
19 | + && echo "Asia/Shanghai" > /etc/timezone \ | ||
20 | + && rm -rf /var/cache/apk/* /tmp/* /var/tmp/* $HOME/.cache ## 清除缓存 | ||
17 | WORKDIR /root/ | 21 | WORKDIR /root/ |
18 | COPY --from=builder /go/src/godevp . | 22 | COPY --from=builder /go/src/godevp . |
19 | EXPOSE 8082 | 23 | EXPOSE 8082 |
-
请 注册 或 登录 后发表评论