123456789101112131415161718192021222324252627 |
- FROM golang:1.17-alpine as build
- WORKDIR /app/kpt-tmr-group
- COPY . .
- RUN go env -w GO111MODULE=on && \
- go env -w GOPROXY=https://goproxy.cn,direct && \
- go env -w CGO_ENABLED=0 && \
- go env -w GOARCH=amd64 && \
- go env -w GOOS=linux && \
- go build -o ./kptTmrGroup -ldflags "-X kpt.kptyun.cn:3000/kpt-event/kpt-tmr-group/pod.appVersion=tmrGroup" main.go
- FROM alpine:latest
- LABEL name="kpt-tmr-group" \
- description="pt service" \
- owner="yiping.xu"
- WORKDIR /app/kpt-tmr-group
- COPY --from=0 /app/kpt-tmr-group/config/ /app/kpt-tmr-group/config/
- COPY --from=0 /app/kpt-tmr-group/kptTmrGroup /app/kpt-tmr-group/kptTmrGroup
- EXPOSE 8090
- VOLUME ["/app/kpt-tmr-group/logger","/app/kpt-tmr-group/config"]
- CMD ["/app/kpt-tmr-group/kptTmrGroup","http"]
|