Skip to content

Commit 0986aa8

Browse files
committed
2 parents 115d743 + f0ea117 commit 0986aa8

File tree

2 files changed

+18
-26
lines changed

2 files changed

+18
-26
lines changed

Dockerfile

Lines changed: 17 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,38 @@
1+
# CI relies on this ARG. Don't remove or rename it
12
ARG DOCKER_VERSION=29.1.3
23

34
# dind-cleaner
4-
FROM golang:1.25-alpine3.22 AS cleaner
5-
5+
FROM golang:1.25-alpine3.23 AS cleaner
66
COPY cleaner/dind-cleaner/* /go/src/github.com/codefresh-io/dind-cleaner/
77
WORKDIR /go/src/github.com/codefresh-io/dind-cleaner/
8-
98
RUN go mod tidy
10-
119
COPY cleaner/dind-cleaner/cmd ./cmd/
10+
RUN CGO_ENABLED=0 go build -o /usr/local/bin/dind-cleaner ./cmd \
11+
&& chmod +x /usr/local/bin/dind-cleaner \
12+
&& rm -rf /go/*
1213

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/*
1614

1715
# bbolt
18-
FROM golang:1.25-alpine3.22 AS bbolt
16+
FROM golang:1.25-alpine3.23 AS bbolt
1917
RUN go install go.etcd.io/bbolt/cmd/bbolt@latest
2018

21-
# node-exporter
22-
FROM quay.io/prometheus/node-exporter:v1.9.1 AS node-exporter
2319

2420
# Main
25-
FROM docker:${DOCKER_VERSION}-dind
26-
27-
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.22/main' >> /etc/apk/repositories \
28-
&& apk upgrade \
29-
# Add fuse-overlayfs for comaptibility with rootless. Volumes created with rootless might use fuse-overlay formatted volumes. If those volumes are later used by dind that runs with root it'll require fuse-overlay to be able to read the volume
30-
&& apk add bash fuse-overlayfs jq --no-cache \
31-
# Needed only for `update-alternatives` below
32-
&& apk add dpkg --no-cache \
33-
# A security fix till it's fixed in base dind image (CR-31906)
34-
&& apk add git --no-cache --upgrade \
35-
&& rm -rf /var/cache/apk/*
36-
21+
FROM docker:${DOCKER_VERSION}-dind AS prod
22+
RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.23/main' >> /etc/apk/repositories \
23+
&& apk upgrade && apk add --no-cache \
24+
bash \
25+
# Add fuse-overlayfs for compatibility with rootless. Volumes created with rootless might use fuse-overlay formatted volumes. If those volumes are later used by dind that runs with root it'll require fuse-overlay to be able to read the volume
26+
fuse-overlayfs \
27+
jq \
28+
# Needed only for `update-alternatives` below
29+
dpkg
3730
# Backward compatibility with kernels that do not support `iptables-nft`. Check #CR-23033 for details.
3831
RUN update-alternatives --install $(which iptables) iptables $(which iptables-legacy) 10 \
3932
&& update-alternatives --install $(which ip6tables) ip6tables $(which ip6tables-legacy) 10
40-
41-
COPY --from=node-exporter /bin/node_exporter /bin/
42-
COPY --from=cleaner /usr/local/bin/dind-cleaner /bin/
33+
COPY --from=quay.io/prometheus/node-exporter:v1.10.2 /bin/node_exporter /bin/
4334
COPY --from=bbolt /go/bin/bbolt /bin/
35+
COPY --from=cleaner /usr/local/bin/dind-cleaner /bin/
4436

4537
WORKDIR /dind
4638
ADD . /dind

service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version: 3.0.6
1+
version: 3.0.8

0 commit comments

Comments
 (0)