diff --git a/Dockerfile b/Dockerfile index 0725657..30cbf6d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,8 +1,15 @@ FROM golang:1.10-alpine as builder -ADD . /go/src/github.com/jimeh/casecmp +RUN set -e \ + && apk add --no-cache git \ + && wget -O - https://github.com/golang/dep/raw/master/install.sh | sh + WORKDIR /go/src/github.com/jimeh/casecmp -RUN CGO_ENABLED=0 go build -a -o /casecmp \ - -ldflags "-X main.Version=$(cat VERSION)" +ADD . /go/src/github.com/jimeh/casecmp +RUN set -e \ + && dep ensure \ + && CGO_ENABLED=0 go build -a -o /casecmp \ + -ldflags "-X main.Version=$(cat VERSION)" + FROM scratch COPY --from=builder /casecmp /