Skip to content

Commit

Permalink
fix docker build
Browse files Browse the repository at this point in the history
  • Loading branch information
aojea committed May 26, 2024
1 parent ce18145 commit ee0937a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@

ARG GOARCH="amd64"
# STEP 1: Build kindnetd binary
FROM golang:1.20 AS builder
FROM golang:1.22 AS builder
# golang envs
ARG GOARCH="amd64"
ARG CNI_VERSION="v1.2.0"
ARG CNI_VERSION="v1.5.0"
ARG GOOS=linux
ENV CGO_ENABLED=0
ENV GO111MODULE="on"
Expand All @@ -36,14 +36,14 @@ RUN echo "Installing CNI binaries ..." \
&& tar -C /opt/cni/bin -xzf /tmp/cni.tgz \
&& rm -rf /tmp/cni.tgz \
&& find /opt/cni/bin -type f -not \( \
-iname host-local \
-o -iname ptp \
-o -iname bridge \
-o -iname portmap \
\) \
-delete
-iname host-local \
-o -iname ptp \
-o -iname bridge \
-o -iname portmap \
\) \
-delete
# STEP 2: Build small image
FROM registry.k8s.io/build-image/distroless-iptables:v0.2.1
FROM registry.k8s.io/build-image/distroless-iptables:v0.5.2
COPY --from=builder --chown=root:root /go/bin/kindnetd /bin/kindnetd
COPY --from=builder --chown=root:root /opt/cni/bin /opt/cni/bin
CMD ["/bin/kindnetd"]
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module sigs.k8s.io/kind/images/kindnetd

go 1.22.0
go 1.22

require (
github.com/coreos/go-iptables v0.7.0
Expand Down

0 comments on commit ee0937a

Please sign in to comment.