Skip to content

Commit

Permalink
Merge pull request #23 from burdandrei/master
Browse files Browse the repository at this point in the history
Docker build fixes
  • Loading branch information
tzahimizrahi committed Jan 1, 2019
2 parents 203766d + da84181 commit ae96aa9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 4 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
vendor/
.vs/
dump.rdb
/build/resec
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## 0.5.1 (January 16, 2019)

FIXES:

* Docker build

## 0.5.0 (September 16, 2018)

FEATURES:
Expand Down
18 changes: 14 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]

0 comments on commit ae96aa9

Please sign in to comment.