diff --git a/.gitignore b/.gitignore index bd53ed7..c89d036 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ vendor/ .vs/ dump.rdb +/build/resec diff --git a/CHANGELOG.md b/CHANGELOG.md index e113eea..330c7fc 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +## 0.5.1 (January 16, 2019) + +FIXES: + + * Docker build + ## 0.5.0 (September 16, 2018) FEATURES: diff --git a/Dockerfile b/Dockerfile index 7344112..82b5b57 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,20 @@ -FROM golang:1.10-alpine -WORKDIR /go/src/github.com/YotpoLtd/resec/ -COPY . /go/src/github.com/YotpoLtd/resec/ +FROM golang:1.11.4-alpine AS builder + +# Download and install the latest release of dep +ADD https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 /usr/bin/dep +RUN chmod +x /usr/bin/dep + +RUN apk add --update git \ + && rm -rf /var/cache/apk/* + +WORKDIR $GOPATH/src/github.com/YotpoLtd/resec/ +COPY Gopkg.toml Gopkg.lock ./ +RUN dep ensure --vendor-only +COPY . ./ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o build/resec . FROM alpine:latest RUN apk --no-cache add ca-certificates WORKDIR /root/ -COPY --from=0 /go/src/github.com/YotpoLtd/resec/build/resec . +COPY --from=builder /go/src/github.com/YotpoLtd/resec/build/resec . CMD ["./resec"]