Skip to content

Commit ae96aa9

Browse files
authored
Merge pull request #23 from burdandrei/master
Docker build fixes
2 parents 203766d + da84181 commit ae96aa9

File tree

3 files changed

+21
-4
lines changed

3 files changed

+21
-4
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
vendor/
22
.vs/
33
dump.rdb
4+
/build/resec

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
## 0.5.1 (January 16, 2019)
2+
3+
FIXES:
4+
5+
* Docker build
6+
17
## 0.5.0 (September 16, 2018)
28

39
FEATURES:

Dockerfile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,20 @@
1-
FROM golang:1.10-alpine
2-
WORKDIR /go/src/github.com/YotpoLtd/resec/
3-
COPY . /go/src/github.com/YotpoLtd/resec/
1+
FROM golang:1.11.4-alpine AS builder
2+
3+
# Download and install the latest release of dep
4+
ADD https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 /usr/bin/dep
5+
RUN chmod +x /usr/bin/dep
6+
7+
RUN apk add --update git \
8+
&& rm -rf /var/cache/apk/*
9+
10+
WORKDIR $GOPATH/src/github.com/YotpoLtd/resec/
11+
COPY Gopkg.toml Gopkg.lock ./
12+
RUN dep ensure --vendor-only
13+
COPY . ./
414
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o build/resec .
515

616
FROM alpine:latest
717
RUN apk --no-cache add ca-certificates
818
WORKDIR /root/
9-
COPY --from=0 /go/src/github.com/YotpoLtd/resec/build/resec .
19+
COPY --from=builder /go/src/github.com/YotpoLtd/resec/build/resec .
1020
CMD ["./resec"]

0 commit comments

Comments
 (0)