File tree Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Expand file tree Collapse file tree 1 file changed +7
-12
lines changed Original file line number Diff line number Diff line change
1
+ # syntax=docker.io/docker/dockerfile-upstream:1.14.1
2
+
1
3
# Build the manager binary
2
4
FROM golang:1.23.2 AS builder
3
-
4
- # Make sure we use go modules
5
5
WORKDIR /vcluster
6
6
7
7
# Copy the Go Modules manifests
8
- COPY go.mod go.sum . /
8
+ COPY go.mod go.sum /vcluster /
9
9
10
10
# Install dependencies
11
11
RUN go mod download
12
12
13
13
# Copy the sources
14
- COPY main.go pkg . /
14
+ COPY --parents pkg main.go /vcluster /
15
15
16
- # Build cmd
16
+ # Build plugin
17
17
RUN CGO_ENABLED=0 go build -o /plugin main.go
18
18
19
19
# we use alpine for easier debugging
20
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
21
+ WORKDIR /plugin
22
+ COPY --from=builder /plugin .
You can’t perform that action at this time.
0 commit comments