Browse Source

修改容器时区

master
DengBiao 1 year ago
parent
commit
9b79b7e5ac
3 changed files with 9 additions and 9 deletions
  1. +3
    -3
      Dockerfile_business
  2. +3
    -3
      Dockerfile_connect
  3. +3
    -3
      Dockerfile_logic

+ 3
- 3
Dockerfile_business View File

@@ -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 FROM ubuntu:xenial as prod
LABEL maintainer="dengbiao" LABEL maintainer="dengbiao"
ENV TZ="Asia/Shanghai"


# 时区纠正 # 时区纠正
ENV TZ="Asia/Shanghai"
RUN rm -f /etc/localtime \ 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 # 在build阶段复制可执行的go二进制文件app
COPY --from=build /go/release/zyos ./zyos COPY --from=build /go/release/zyos ./zyos


+ 3
- 3
Dockerfile_connect View File

@@ -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 FROM ubuntu:xenial as prod
LABEL maintainer="dengbiao" LABEL maintainer="dengbiao"
ENV TZ="Asia/Shanghai"


# 时区纠正 # 时区纠正
ENV TZ="Asia/Shanghai"
RUN rm -f /etc/localtime \ 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 # 在build阶段复制可执行的go二进制文件app
COPY --from=build /go/release/zyos ./zyos COPY --from=build /go/release/zyos ./zyos


+ 3
- 3
Dockerfile_logic View File

@@ -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 FROM ubuntu:xenial as prod
LABEL maintainer="dengbiao" LABEL maintainer="dengbiao"
ENV TZ="Asia/Shanghai"


# 时区纠正 # 时区纠正
ENV TZ="Asia/Shanghai"
RUN rm -f /etc/localtime \ 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 # 在build阶段复制可执行的go二进制文件app
COPY --from=build /go/release/zyos ./zyos COPY --from=build /go/release/zyos ./zyos


Loading…
Cancel
Save