up
This commit is contained in:
1 parent
2f848fda1e
commit
9631ecf68b
3 files changed
+54
-22
No files matched your search
@@ -6,6 +6,10 @@ ENV GO111MODULE=off
|
||||
RUN GOARCH=amd64 GOOS=linux go build -ldflags="-s -w" -o hello main.go
|
||||
|
||||
FROM alpine:latest AS runner
|
||||
# 设置alpine 时间为上海时间
|
||||
RUN apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
||||
&& echo "Asia/Shanghai" > /etc/timezone \
|
||||
&& apk del tzdata
|
||||
COPY --from=builder /app/hello /app/hello
|
||||
WORKDIR /app
|
||||
EXPOSE 80
|
||||
|
||||
Reference in new issue
Block a user