0a080beffa
* DevEnv: updates nodejs to 12.x and golang to 1.13 * Updates CI-build and CI-deploy image versions * DevEnv: updates update repo readme * DevEnv: updates build container version
19 lines
753 B
Docker
19 lines
753 B
Docker
# This Dockerfile builds an image for a client_golang example.
|
|
|
|
# Builder image, where we build the example.
|
|
FROM golang:1.13.4 AS builder
|
|
# Download prometheus/client_golang/examples/random first
|
|
RUN go get github.com/prometheus/client_golang/examples/random
|
|
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.
|
|
FROM scratch
|
|
LABEL maintainer "The Prometheus Authors <prometheus-developers@googlegroups.com>"
|
|
COPY --from=builder /go/src/github.com/prometheus/client_golang/examples/random .
|
|
EXPOSE 8080
|
|
ENTRYPOINT ["/random"]
|