Sfoglia il codice sorgente

dockerfile: edit timezone for Shanghai 3

Yi 1 anno fa
parent
commit
1aa0d92d5a
1 ha cambiato i file con 4 aggiunte e 4 eliminazioni
  1. 4 4
      Dockerfile

+ 4 - 4
Dockerfile

@@ -13,7 +13,6 @@ RUN go env -w GO111MODULE=on && \
     go env -w GOOS=linux && \
     go build -o ./bin/kptTmr -ldflags "-X kpt.kptyun.cn:3000/kpt-event/kpt-tmr/pod.appVersion=tmr" main.go
 
-RUN ls -l && pwd
 
 FROM alpine:latest
 LABEL name="kpt-tmr" \
@@ -22,13 +21,14 @@ owner="yiping.xu"
 
 WORKDIR /app/kpt-tmr
 
+RUN apk update && apk add tzdata
 RUN ls -l /usr/share && ls -l /usr/share/zoneinfo
-
-RUN apk add --no-cache tzdata \
-&& ln -sv /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
+RUN ln -sv /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
 && echo "Asia/Shanghai" > /etc/timezone \
 && date
 
+
+
 COPY --from=0 /app/kpt-tmr/conf/ /app/kpt-tmr/bin/conf/
 COPY --from=0  /app/kpt-tmr/bin/kptTmr /app/kpt-tmr/bin/kptTmr