Skip to content

Commit d65c89a

Browse files
committed
cleanup Dockerfile
1 parent 207f528 commit d65c89a

File tree

1 file changed

+7
-12
lines changed

1 file changed

+7
-12
lines changed

Dockerfile

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,22 @@
1+
# syntax=docker.io/docker/dockerfile-upstream:1.14.1
2+
13
# Build the manager binary
24
FROM golang:1.23.2 AS builder
3-
4-
# Make sure we use go modules
55
WORKDIR /vcluster
66

77
# Copy the Go Modules manifests
8-
COPY go.mod go.sum ./
8+
COPY go.mod go.sum /vcluster/
99

1010
# Install dependencies
1111
RUN go mod download
1212

1313
# Copy the sources
14-
COPY main.go pkg ./
14+
COPY --parents pkg main.go /vcluster/
1515

16-
# Build cmd
16+
# Build plugin
1717
RUN CGO_ENABLED=0 go build -o /plugin main.go
1818

1919
# we use alpine for easier debugging
2020
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 .

0 commit comments

Comments
 (0)