diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..d33fbc7 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,13 @@ +FROM golang:1.18 as builder + +ARG GOARCH=amd64 +ARG GOOS=linux + +COPY . /src +WORKDIR /src +RUN GOOS=$GOOS GOARCH=$GOARCH CGO_ENABLED=0 go build -o exporter . + +FROM scratch +COPY --from=builder /src/exporter /exporter +EXPOSE 9101 +ENTRYPOINT ["/exporter"]