We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f991c82 commit 9e37d1bCopy full SHA for 9e37d1b
1 file changed
Dockerfile
@@ -3,20 +3,22 @@
3
FROM golang:alpine AS build-env
4
ENV GOPATH=/gopath
5
ENV PATH=$GOPATH/bin:$PATH
6
-ADD . /gopath/src/github.com/dfeyer/flow-debugproxy
+WORKDIR /app
7
RUN apk update && \
8
apk upgrade && \
9
apk add git
10
-RUN cd /gopath/src/github.com/dfeyer/flow-debugproxy \
11
- && go get \
12
- && CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o flow-debugproxy
+ADD go.mod .
+ADD go.sum .
+RUN go mod download
13
+ADD . .
14
+RUN CGO_ENABLED=0 go build -o flow-debugproxy
15
16
#
17
# Build step
18
FROM alpine
19
WORKDIR /app
20
-COPY --from=build-env /gopath/src/github.com/dfeyer/flow-debugproxy/flow-debugproxy /app/
21
+COPY --from=build-env /app/flow-debugproxy /app/
22
23
ENV ADDITIONAL_ARGS ""
24
0 commit comments