-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from burdandrei/master
Docker build fixes
- Loading branch information
Showing
3 changed files
with
21 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
vendor/ | ||
.vs/ | ||
dump.rdb | ||
/build/resec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"] |