Skip to content

Commit

Permalink
Add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
RW21 committed Jul 2, 2022
1 parent 530bef6 commit c2b46dc
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit c2b46dc

Please sign in to comment.