1.github
https://github.com/c4po/harbor_exporter
2.dockerfile
FROM golang:1.17 ENV GO111MODULE=on \ GOPROXY="https://goproxy.cn,direct" COPY harbor_exporter-0.6.4 /apps/harbor_exporter-0.6.4 WORKDIR /apps/harbor_exporter-0.6.4 RUN make build RUN apk --no-cache add ca-certificates RUN addgroup -g 1001 appgroup && \ adduser -H -D -s /bin/false -G appgroup -u 1001 appuser USER 1001:1001 RUN cp /apps/harbor_exporter-0.6.4/releases/harbor_exporter /bin/harbor_exporter ENTRYPOINT ["/bin/harbor_exporter"]
标签:exporter,RUN,harbor,apps,0.6,源码,1001 From: https://www.cnblogs.com/wdgde/p/17178313.html