Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 7 additions & 12 deletions Dockerfile-cni-plugin
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,18 @@
FROM --platform=$BUILDPLATFORM golang:1.26.4-alpine as go
WORKDIR /build
COPY --link go.mod go.sum ./
COPY --link ./cni-install ./cni-install
COPY --link ./cni-plugin ./cni-plugin
COPY --link ./internal ./internal
COPY --link ./proxy-init ./proxy-init
COPY --link ./pkg ./pkg
RUN go mod download
ARG TARGETARCH
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH GO111MODULE=on \
go build -o /go/bin/linkerd-cni -mod=readonly -ldflags "-s -w" -v ./cni-plugin/
RUN CGO_ENABLED=0 GOOS=linux GOARCH=$TARGETARCH GO111MODULE=on \
go build -o /go/bin/linkerd2-cni-install -mod=readonly -ldflags "-s -w" -v ./cni-install/


FROM --platform=$BUILDPLATFORM ghcr.io/linkerd/dev:v50-rust-musl as cni-repair-controller
WORKDIR /build
Expand Down Expand Up @@ -41,18 +46,8 @@ RUN --mount=type=cache,target=target \

FROM --platform=$TARGETPLATFORM alpine:3.24.1 as runtime
WORKDIR /linkerd
RUN apk add \
# For inotifywait
inotify-tools \
# For pgrep
procps \
bash \
jq

COPY --from=go /go/bin/linkerd-cni /opt/cni/bin/
COPY --from=go /go/bin/linkerd2-cni-install /usr/bin/
COPY --from=cni-repair-controller /build/linkerd-cni-repair-controller /usr/lib/linkerd/
COPY LICENSE .
COPY cni-plugin/deployment/scripts/install-cni.sh .
COPY cni-plugin/deployment/scripts/filter.jq .
ENV PATH=/linkerd:/opt/cni/bin:$PATH
CMD ["install-cni.sh"]
CMD ["/usr/bin/linkerd2-cni-install"]
13 changes: 0 additions & 13 deletions cni-plugin/deployment/scripts/filter.jq

This file was deleted.

Loading