Skip to content

Commit

Permalink
added dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
caarlos0 committed Sep 7, 2017
1 parent f23dc41 commit a990f27
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM golang:1.9-alpine3.6 AS builder
WORKDIR /go/src/github.com/caarlos0/domain_exporter
ADD . .
RUN apk add -U git
RUN go get -v github.com/golang/dep/...
RUN dep ensure -v
ENV CGO_ENABLED=0
ENV GOOS=linux
ENV GOARCH=amd64
RUN go build --ldflags "-extldflags "-static"" -o domain_exporter .

FROM scratch
EXPOSE 9222
WORKDIR /
COPY --from=builder /go/src/github.com/caarlos0/domain_exporter/domain_exporter .
ENTRYPOINT ["./domain_exporter"]

0 comments on commit a990f27

Please sign in to comment.