diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..2d2ecd6 --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +.git/ diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..0dc8ce1 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,19 @@ +FROM golang:1.9.5 AS builder + +WORKDIR /go/src/github.com/securityscorecard/vault-vouch +ADD . . + +ENV CGO_ENABLED=0 + +RUN go get -v github.com/Masterminds/glide && \ + glide install && \ + go build -o /vault-vouch -v -a -tags netgo -ldflags="-s -w" + +FROM scratch + +WORKDIR / + +COPY --from=builder /vault-vouch . + +ENTRYPOINT ["/vault-vouch"] +CMD ["-h"]