|
@@ -1,6 +1,6 @@
|
|
FROM golang:1.17-alpine as build
|
|
FROM golang:1.17-alpine as build
|
|
|
|
|
|
-WORKDIR /app/kpt-tmr-sheep
|
|
|
|
|
|
+WORKDIR /app/kpt-tmr
|
|
|
|
|
|
COPY . .
|
|
COPY . .
|
|
|
|
|
|
@@ -11,25 +11,24 @@ RUN go env -w GO111MODULE=on && \
|
|
go env -w CGO_ENABLED=0 && \
|
|
go env -w CGO_ENABLED=0 && \
|
|
go env -w GOARCH=amd64 && \
|
|
go env -w GOARCH=amd64 && \
|
|
go env -w GOOS=linux && \
|
|
go env -w GOOS=linux && \
|
|
- go build -o ./bin/kptTmrSheep -ldflags "-X kpt.kptyun.cn:3000/kpt-event/kpt-tmr-sheep/pod.appVersion=tmr" main.go
|
|
|
|
|
|
+ go build -o ./bin/kptTmr -ldflags "-X kpt.kptyun.cn:3000/kpt-event/kpt-tmr/pod.appVersion=tmr" main.go
|
|
|
|
|
|
|
|
|
|
FROM alpine:latest
|
|
FROM alpine:latest
|
|
-LABEL name="kpt-tmr-sheep" \
|
|
|
|
|
|
+LABEL name="kpt-tmr" \
|
|
description="pt service" \
|
|
description="pt service" \
|
|
owner="yiping.xu"
|
|
owner="yiping.xu"
|
|
|
|
|
|
-WORKDIR /app/kpt-tmr-sheep
|
|
|
|
|
|
+WORKDIR /app/kpt-tmr
|
|
|
|
|
|
RUN apk update && apk add tzdata
|
|
RUN apk update && apk add tzdata
|
|
RUN ln -sv /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
|
RUN ln -sv /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
|
|
&& echo "Asia/Shanghai" > /etc/timezone \
|
|
&& echo "Asia/Shanghai" > /etc/timezone \
|
|
|
|
|
|
-COPY --from=0 /app/kpt-tmr-sheep/conf/ /app/kpt-tmr-sheep/bin/conf/
|
|
|
|
-COPY --from=0 /app/kpt-tmr-sheep/uploads /app/kpt-tmr-sheep/bin/uploads
|
|
|
|
-COPY --from=0 /app/kpt-tmr-sheep/bin/kptTmr /app/kpt-tmr-sheep/bin/kptTmr
|
|
|
|
|
|
+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
|
|
|
|
|
|
EXPOSE 8081
|
|
EXPOSE 8081
|
|
-VOLUME ["/app/kpt-tmr-sheep/logger","/app/kpt-tmr-sheep/bin/conf/"]
|
|
|
|
|
|
+VOLUME ["/app/kpt-tmr/logger","/app/kpt-tmr/bin/conf/"]
|
|
|
|
|
|
-CMD ["/app/kpt-tmr-sheep/bin/kptTmrSheep"]
|
|
|
|
|
|
+CMD ["/app/kpt-tmr/bin/kptTmr"]
|