diff --git a/Dockerfile_business b/Dockerfile_business index 8c6a1ba..a30fd45 100644 --- a/Dockerfile_business +++ b/Dockerfile_business @@ -17,12 +17,12 @@ RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o zyos cmd/business/main.go FROM ubuntu:xenial as prod LABEL maintainer="dengbiao" -ENV TZ="Asia/Shanghai" # 时区纠正 +ENV TZ="Asia/Shanghai" RUN rm -f /etc/localtime \ - && ln -sv /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone + && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \ + && echo $TZ > /etc/timezone # 在build阶段复制可执行的go二进制文件app COPY --from=build /go/release/zyos ./zyos diff --git a/Dockerfile_connect b/Dockerfile_connect index f7d3a77..fec87b6 100644 --- a/Dockerfile_connect +++ b/Dockerfile_connect @@ -17,12 +17,12 @@ RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o zyos cmd/connect/main.go FROM ubuntu:xenial as prod LABEL maintainer="dengbiao" -ENV TZ="Asia/Shanghai" # 时区纠正 +ENV TZ="Asia/Shanghai" RUN rm -f /etc/localtime \ - && ln -sv /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone + && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \ + && echo $TZ > /etc/timezone # 在build阶段复制可执行的go二进制文件app COPY --from=build /go/release/zyos ./zyos diff --git a/Dockerfile_logic b/Dockerfile_logic index a92239b..484c360 100644 --- a/Dockerfile_logic +++ b/Dockerfile_logic @@ -17,12 +17,12 @@ RUN GOOS=linux CGO_ENABLED=0 GOARCH=amd64 go build -o zyos cmd/logic/main.go FROM ubuntu:xenial as prod LABEL maintainer="dengbiao" -ENV TZ="Asia/Shanghai" # 时区纠正 +ENV TZ="Asia/Shanghai" RUN rm -f /etc/localtime \ - && ln -sv /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ - && echo "Asia/Shanghai" > /etc/timezone + && ln -snf /usr/share/zoneinfo/$TZ /etc/localtime \ + && echo $TZ > /etc/timezone # 在build阶段复制可执行的go二进制文件app COPY --from=build /go/release/zyos ./zyos