Skip to content

Commit d0a4bb3

Browse files
committed
chore: improve Dockerfile.
1 parent bcddaa3 commit d0a4bb3

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

Dockerfile

+9-3
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,23 @@ RUN apk --update upgrade \
44
&& apk --no-cache --no-progress add git make \
55
&& rm -rf /var/cache/apk/*
66

7-
WORKDIR /go/src/github.com/containous/kutteri
8-
COPY . .
7+
WORKDIR /go/kutteri
8+
9+
ENV GO111MODULE on
910

11+
# Download go modules
12+
COPY go.mod .
13+
COPY go.sum .
1014
RUN go mod download
15+
16+
COPY . .
1117
RUN make build
1218

1319
FROM alpine:3.6
1420
RUN apk --update upgrade \
1521
&& apk --no-cache --no-progress add ca-certificates git \
1622
&& rm -rf /var/cache/apk/*
1723

18-
COPY --from=builder /go/src/github.com/containous/kutteri/kutteri /usr/bin/kutteri
24+
COPY --from=builder /go/kutteri/kutteri /usr/bin/kutteri
1925

2026
ENTRYPOINT ["/usr/bin/kutteri"]

0 commit comments

Comments
 (0)