diff --git a/config/dockerfiles/tools/Dockerfile b/config/dockerfiles/tools/Dockerfile index f0760c8e..c286769d 100644 --- a/config/dockerfiles/tools/Dockerfile +++ b/config/dockerfiles/tools/Dockerfile @@ -19,13 +19,12 @@ RUN CGO_ENABLED=0 GO111MODULE=on go build -a -o jwt cmd/tools/jwt/jwt_cmd.go FROM golang:1.17 as downloader RUN go install github.com/linuxsuren/http-downloader@v0.0.49 -RUN http-downloader install kubesphere-sigs/ks@v0.0.60 +RUN http-downloader install kubesphere-sigs/ks@v0.0.70 # Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details FROM gcr.io/distroless/static:nonroot -WORKDIR / -COPY --from=builder /workspace/jwt . +COPY --from=builder /workspace/jwt /jwt COPY --from=downloader /usr/local/bin/ks /usr/local/bin/ks USER nonroot:nonroot