add docker image

This commit is contained in:
tchivert committed 2023-11-09 15:55:59 +01:00
1 parent 929d90baa3
commit f1dbf0f807
1 file changed
+21
+21
View File
@@ -0,0 +1,21 @@
FROM golang:alpine AS build
RUN apk add build-base make
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY *.go ./
RUN GOOS=linux go build -o latency-exporter .
FROM golang:alpine
WORKDIR /app
COPY --from=build /app/latency-exporter ./
EXPOSE 9062
ENTRYPOINT ["/app/latency-exporter"]