Skip to content

Commit e045cde

Browse files
committed
update Dockerfile to use go.mod
1 parent 7c9384b commit e045cde

File tree

3 files changed

+27
-0
lines changed

3 files changed

+27
-0
lines changed

artifacts/images/agent-build.Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ FROM golang:1.12.1 as builder
33

44
# Copy in the go src
55
WORKDIR /go/src/sigs.k8s.io/apiserver-network-proxy
6+
7+
# Copy the Go Modules manifests
8+
COPY go.mod go.mod
9+
COPY go.sum go.sum
10+
11+
# Cache dependencies
12+
RUN go mod download
13+
14+
# Copy the sources
615
COPY pkg/ pkg/
716
COPY cmd/ cmd/
817
COPY proto/ proto/

artifacts/images/client-build.Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ FROM golang:1.12.1 as builder
33

44
# Copy in the go src
55
WORKDIR /go/src/sigs.k8s.io/apiserver-network-proxy
6+
7+
# Copy the Go Modules manifests
8+
COPY go.mod go.mod
9+
COPY go.sum go.sum
10+
11+
# Cache dependencies
12+
RUN go mod download
13+
14+
# Copy the sources
615
COPY pkg/ pkg/
716
COPY cmd/ cmd/
817
COPY proto/ proto/

artifacts/images/server-build.Dockerfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ FROM golang:1.12.1 as builder
33

44
# Copy in the go src
55
WORKDIR /go/src/sigs.k8s.io/apiserver-network-proxy
6+
7+
# Copy the Go Modules manifests
8+
COPY go.mod go.mod
9+
COPY go.sum go.sum
10+
11+
# Cache dependencies
12+
RUN go mod download
13+
14+
# Copy the sources
615
COPY pkg/ pkg/
716
COPY cmd/ cmd/
817
COPY proto/ proto/

0 commit comments

Comments
 (0)