Skip to content
This repository was archived by the owner on Aug 12, 2025. It is now read-only.

Commit 15fe509

Browse files
committed
fix Dockerfile builds to work with go modules
1 parent 278ddec commit 15fe509

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,12 @@ WORKDIR /go/src/github.com/packethost/cluster-api-provider-packet
66
COPY pkg/ pkg/
77
COPY cmd/ cmd/
88
COPY vendor/ vendor/
9+
COPY go.* ./
10+
COPY tools.go ./
11+
912

1013
# Build
11-
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -a -o manager github.com/packethost/cluster-api-provider-packet/cmd/manager
14+
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 GO111MODULE=on go build -mod=vendor -a -o manager github.com/packethost/cluster-api-provider-packet/cmd/manager
1215

1316
# Copy the controller-manager into a thin image
1417
FROM alpine:3.10

0 commit comments

Comments
 (0)