We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 207f528 commit d65c89aCopy full SHA for d65c89a
Dockerfile
@@ -1,27 +1,22 @@
1
+# syntax=docker.io/docker/dockerfile-upstream:1.14.1
2
+
3
# Build the manager binary
4
FROM golang:1.23.2 AS builder
-
-# Make sure we use go modules
5
WORKDIR /vcluster
6
7
# Copy the Go Modules manifests
8
-COPY go.mod go.sum ./
+COPY go.mod go.sum /vcluster/
9
10
# Install dependencies
11
RUN go mod download
12
13
# Copy the sources
14
-COPY main.go pkg ./
+COPY --parents pkg main.go /vcluster/
15
16
-# Build cmd
+# Build plugin
17
RUN CGO_ENABLED=0 go build -o /plugin main.go
18
19
# we use alpine for easier debugging
20
FROM alpine
21
22
-# Set root path as working directory
23
-WORKDIR /
24
25
-RUN mkdir -p /plugin
26
27
-COPY --from=builder /plugin /plugin/plugin
+WORKDIR /plugin
+COPY --from=builder /plugin .
0 commit comments