Skip to content

Commit 565af68

Browse files
author
Arvind Thirumurugan
committed
address Dockerfile comments
1 parent 9a27492 commit 565af68

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

docker/crd-installer.Dockerfile

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,18 @@ RUN go mod download
1111

1212
# Copy the go source
1313
COPY cmd/crdinstaller/ cmd/crdinstaller/
14-
COPY apis/ apis/
15-
COPY pkg/ pkg/
1614

1715
ARG TARGETARCH
1816

1917
# Build
2018
RUN CGO_ENABLED=0 GOOS=linux GOARCH=${TARGETARCH} GO111MODULE=on go build -o crdinstaller cmd/crdinstaller/main.go
2119

2220
# Use distroless as minimal base image to package the crdinstaller binary
23-
# Include kubectl for accessing the Kubernetes API
2421
FROM gcr.io/distroless/static:nonroot
25-
WORKDIR /workspace
26-
COPY --from=builder /workspace/crdinstaller /usr/local/bin/crdinstaller
22+
WORKDIR /
23+
COPY --from=builder /workspace/crdinstaller .
2724
COPY config/crd/bases/ /workspace/config/crd/bases/
2825

2926
USER 65532:65532
3027

31-
ENTRYPOINT ["/usr/local/bin/crdinstaller"]
28+
ENTRYPOINT ["/crdinstaller"]

0 commit comments

Comments
 (0)