1- ARG DOCKER_VERSION=28.5.1
2-
31# dind-cleaner
4- FROM golang:1.25-alpine3.22 AS cleaner
5-
2+ FROM golang:1.25-alpine3.23 AS cleaner
63COPY cleaner/dind-cleaner/* /go/src/github.com/codefresh-io/dind-cleaner/
74WORKDIR /go/src/github.com/codefresh-io/dind-cleaner/
8-
95RUN go mod tidy
10-
116COPY cleaner/dind-cleaner/cmd ./cmd/
7+ RUN CGO_ENABLED=0 go build -o /usr/local/bin/dind-cleaner ./cmd \
8+ && chmod +x /usr/local/bin/dind-cleaner \
9+ && rm -rf /go/*
1210
13- RUN CGO_ENABLED=0 go build -o /usr/local/bin/dind-cleaner ./cmd && \
14- chmod +x /usr/local/bin/dind-cleaner && \
15- rm -rf /go/*
1611
1712# bbolt
18- FROM golang:1.25-alpine3.22 AS bbolt
13+ FROM golang:1.25-alpine3.23 AS bbolt
1914RUN go install go.etcd.io/bbolt/cmd/bbolt@latest
2015
21- # node-exporter
22- FROM quay.io/prometheus/node-exporter:v1.9.1 AS node-exporter
2316
2417# Main
25- FROM docker:${DOCKER_VERSION}-dind-rootless
26-
18+ FROM docker:28.5.2-dind-rootless
2719USER root
28-
2920RUN chown -R $(id -u rootless) /var /run /lib /home /etc/ssl /etc/apk
30-
3121# Add community for fuse-overlayfs
3222RUN echo -en "https://dl-cdn.alpinelinux.org/alpine/v$(cut -d'.' -f1,2 /etc/alpine-release)/main\n https://dl-cdn.alpinelinux.org/alpine/v$(cut -d'.' -f1,2 /etc/alpine-release)/community" > /etc/apk/repositories \
3323 && apk upgrade \
@@ -39,23 +29,17 @@ RUN echo -en "https://dl-cdn.alpinelinux.org/alpine/v$(cut -d'.' -f1,2 /etc/alpi
3929 && apk add git --no-cache --upgrade \
4030 && rm /usr/local/bin/vpnkit \
4131 && rm -rf /var/cache/apk/*
42-
4332# Backward compatibility with kernels that do not support `iptables-nft`. Check #CR-23033 for details.
4433RUN update-alternatives --install $(which iptables) iptables $(which iptables-legacy) 10 \
4534 && update-alternatives --install $(which ip6tables) ip6tables $(which ip6tables-legacy) 10
46-
4735ENV DOCKERD_ROOTLESS_ROOTLESSKIT_NET=slirp4netns
48-
49- COPY --from=node-exporter /bin/node_exporter /bin/
50- COPY --from=cleaner /usr/local/bin/dind-cleaner /bin/
36+ COPY --from=quay.io/prometheus/node-exporter:v1.10.2 /bin/node_exporter /bin/
5137COPY --from=bbolt /go/bin/bbolt /bin/
52-
38+ COPY --from=cleaner /usr/local/bin/dind-cleaner /bin/
5339WORKDIR /dind
5440ADD . /dind
55-
5641RUN chown -R $(id -u rootless) /dind
5742RUN chown -R $(id -u rootless) /var/run
58-
5943RUN chown -R $(id -u rootless) /etc/ssl && chmod 777 -R /etc/ssl
6044USER rootless
6145RUN rm -i -f /var/run && ln -s /run/user/1000 /var/run
0 commit comments