|
1 | | -ARG DOCKER_VERSION=28.5.1 |
2 | | - |
3 | 1 | # dind-cleaner |
4 | | -FROM golang:1.25-alpine3.22 AS cleaner |
5 | | - |
| 2 | +FROM golang:1.25-alpine3.23 AS cleaner |
6 | 3 | COPY cleaner/dind-cleaner/* /go/src/github.com/codefresh-io/dind-cleaner/ |
7 | 4 | WORKDIR /go/src/github.com/codefresh-io/dind-cleaner/ |
8 | | - |
9 | 5 | RUN go mod tidy |
10 | | - |
11 | 6 | COPY 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/* |
12 | 10 |
|
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/* |
16 | 11 |
|
17 | 12 | # bbolt |
18 | | -FROM golang:1.25-alpine3.22 AS bbolt |
| 13 | +FROM golang:1.25-alpine3.23 AS bbolt |
19 | 14 | RUN go install go.etcd.io/bbolt/cmd/bbolt@latest |
20 | 15 |
|
21 | | -# node-exporter |
22 | | -FROM quay.io/prometheus/node-exporter:v1.9.1 AS node-exporter |
23 | 16 |
|
24 | 17 | # 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 | | - |
| 18 | +FROM docker:28.5.2-dind AS prod |
| 19 | +RUN echo 'http://dl-cdn.alpinelinux.org/alpine/v3.23/main' >> /etc/apk/repositories \ |
| 20 | + && apk upgrade && apk add --no-cache \ |
| 21 | + bash \ |
| 22 | + # 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 |
| 23 | + fuse-overlayfs \ |
| 24 | + jq \ |
| 25 | + # Needed only for `update-alternatives` below |
| 26 | + dpkg |
37 | 27 | # Backward compatibility with kernels that do not support `iptables-nft`. Check #CR-23033 for details. |
38 | 28 | RUN update-alternatives --install $(which iptables) iptables $(which iptables-legacy) 10 \ |
39 | 29 | && 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/ |
| 30 | +COPY --from=quay.io/prometheus/node-exporter:v1.10.2 /bin/node_exporter /bin/ |
43 | 31 | COPY --from=bbolt /go/bin/bbolt /bin/ |
| 32 | +COPY --from=cleaner /usr/local/bin/dind-cleaner /bin/ |
44 | 33 |
|
45 | 34 | WORKDIR /dind |
46 | 35 | ADD . /dind |
|
0 commit comments