Skip to content

Commit ef0d890

Browse files
authored
Merge pull request #65 from Jefftree/fix-docker-build
Fix docker-build
2 parents 8bf6a95 + 8183037 commit ef0d890

File tree

4 files changed

+20
-5
lines changed

4 files changed

+20
-5
lines changed

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ bin:
5656
.PHONY: build
5757
build: bin/proxy-agent bin/proxy-server bin/proxy-test-client
5858

59-
bin/proxy-agent: proto/agent/agent.pb.go proto/client/client.pb.go bin cmd/agent/main.go
59+
bin/proxy-agent: proto/agent/agent.pb.go konnectivity-client/proto/client/client.pb.go bin cmd/agent/main.go
6060
GO111MODULE=on go build -o bin/proxy-agent cmd/agent/main.go
6161

62-
bin/proxy-test-client: proto/client/client.pb.go bin cmd/client/main.go
62+
bin/proxy-test-client: konnectivity-client/proto/client/client.pb.go bin cmd/client/main.go
6363
GO111MODULE=on go build -o bin/proxy-test-client cmd/client/main.go
6464

65-
bin/proxy-server: proto/agent/agent.pb.go proto/client/client.pb.go bin cmd/proxy/main.go
65+
bin/proxy-server: proto/agent/agent.pb.go konnectivity-client/proto/client/client.pb.go bin cmd/proxy/main.go
6666
GO111MODULE=on go build -o bin/proxy-server cmd/proxy/main.go
6767

6868
## --------------------------------------
@@ -75,9 +75,9 @@ bin/proxy-server: proto/agent/agent.pb.go proto/client/client.pb.go bin cmd/prox
7575
## --------------------------------------
7676

7777
.PHONY: gen
78-
gen: proto/agent/agent.pb.go proto/client/client.pb.go mock_gen
78+
gen: proto/agent/agent.pb.go konnectivity-client/proto/client/client.pb.go mock_gen
7979

80-
proto/client/client.pb.go: konnectivity-client/proto/client/client.proto
80+
konnectivity-client/proto/client/client.pb.go: konnectivity-client/proto/client/client.proto
8181
protoc -I . konnectivity-client/proto/client/client.proto --go_out=plugins=grpc:${GOPATH}/src
8282
cat hack/go-license-header.txt konnectivity-client/proto/client/client.pb.go > konnectivity-client/proto/client/client.licensed.go
8383
mv konnectivity-client/proto/client/client.licensed.go konnectivity-client/proto/client/client.pb.go

artifacts/images/agent-build.Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ WORKDIR /go/src/sigs.k8s.io/apiserver-network-proxy
88
COPY go.mod go.mod
99
COPY go.sum go.sum
1010

11+
# This is required before go mod download because we have a
12+
# replace directive for konnectivity-client in go.mod
13+
# The download will fail without the directory present
14+
COPY konnectivity-client/ konnectivity-client/
15+
1116
# Cache dependencies
1217
RUN go mod download
1318

artifacts/images/client-build.Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ WORKDIR /go/src/sigs.k8s.io/apiserver-network-proxy
88
COPY go.mod go.mod
99
COPY go.sum go.sum
1010

11+
# This is required before go mod download because we have a
12+
# replace directive for konnectivity-client in go.mod
13+
# The download will fail without the directory present
14+
COPY konnectivity-client/ konnectivity-client/
15+
1116
# Cache dependencies
1217
RUN go mod download
1318

artifacts/images/server-build.Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ WORKDIR /go/src/sigs.k8s.io/apiserver-network-proxy
88
COPY go.mod go.mod
99
COPY go.sum go.sum
1010

11+
# This is required before go mod download because we have a
12+
# replace directive for konnectivity-client in go.mod
13+
# The download will fail without the directory present
14+
COPY konnectivity-client/ konnectivity-client/
15+
1116
# Cache dependencies
1217
RUN go mod download
1318

0 commit comments

Comments
 (0)