mirror of
https://github.com/grafana/grafana.git
synced 2024-11-25 18:30:41 -06:00
devenv: update prom random_data for go1.17 (use go install) (#38763)
* devenv: update prom random_data for go1.17 (use go install) * restore env vars and tags to install cmd
This commit is contained in:
parent
bd95856ff9
commit
f524cdb5ee
@ -3,16 +3,11 @@
|
|||||||
# Builder image, where we build the example.
|
# Builder image, where we build the example.
|
||||||
FROM golang:1.17 AS builder
|
FROM golang:1.17 AS builder
|
||||||
# Download prometheus/client_golang/examples/random first
|
# Download prometheus/client_golang/examples/random first
|
||||||
RUN go get github.com/prometheus/client_golang/examples/random
|
RUN CGO_ENABLED=0 GOOS=linux go install -tags netgo -ldflags '-w' github.com/prometheus/client_golang/examples/random@latest
|
||||||
WORKDIR /go/src/github.com/prometheus/client_golang
|
|
||||||
WORKDIR /go/src/github.com/prometheus/client_golang/prometheus
|
|
||||||
RUN go get -d
|
|
||||||
WORKDIR /go/src/github.com/prometheus/client_golang/examples/random
|
|
||||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w'
|
|
||||||
|
|
||||||
# Final image.
|
# Final image.
|
||||||
FROM scratch
|
FROM scratch
|
||||||
LABEL maintainer "The Prometheus Authors <prometheus-developers@googlegroups.com>"
|
LABEL maintainer "The Prometheus Authors <prometheus-developers@googlegroups.com>"
|
||||||
COPY --from=builder /go/src/github.com/prometheus/client_golang/examples/random .
|
COPY --from=builder /go/bin/random .
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
ENTRYPOINT ["/random"]
|
ENTRYPOINT ["/random"]
|
||||||
|
Loading…
Reference in New Issue
Block a user