1+ # Pinned intentionally. Do NOT bump the base image without revisiting
2+ # build-go.sh's glibc-check assertion (`minor < 32`). Ubuntu 20.04 ships
3+ # glibc 2.31, which caps CGO-linked linux/amd64 binaries at GLIBC_2.31
4+ # symbols, keeping dist.ipfs.tech tarballs runnable on CentOS 7/RHEL 7,
5+ # RHEL 8/9, Ubuntu 18.04/20.04, and Debian 10/11. Upgrading the base
6+ # image is a user-facing compat break and must be announced in release
7+ # notes. Revisit by 2026-08 (Debian 11 LTS EOL) to pick the next floor.
18FROM ubuntu:20.04
29
3- ENV DEBIAN_FRONTEND noninteractive
10+ ENV DEBIAN_FRONTEND=noninteractive
11+ ENV TZ=Etc/UTC
412ARG USER_UID
513
614ARG KUBO_VER
7- RUN apt-get update -q && apt-get install -y git curl gnupg jq build-essential gawk zip tzdata && \
8- ln -fs /usr/share/zoneinfo/Etc/UTC /etc/localtime && \
9- dpkg-reconfigure --frontend noninteractive tzdata
15+ RUN apt-get update -q \
16+ && apt-get install -y --no-install-recommends \
17+ ca-certificates git curl gnupg jq build-essential gawk zip tzdata \
18+ && rm -rf /var/lib/apt/lists/*
1019
1120RUN curl -sS --retry 5 \
1221 "https://dist.ipfs.tech/kubo/${KUBO_VER}/kubo_${KUBO_VER}_linux-amd64.tar.gz" -o /tmp/kubo.tar.gz && \
@@ -18,15 +27,15 @@ RUN curl -sS --retry 5 \
1827 | tar -xz -C /usr/local/bin asdf
1928
2029RUN adduser --shell /bin/bash --home /asdf --disabled-password --gecos asdf asdf --uid $USER_UID
21- ENV ASDF_DATA_DIR=/asdf/.asdf
22- ENV PATH="${PATH}:/asdf/.asdf/shims"
30+ ENV ASDF_DATA_DIR=/asdf/.asdf \
31+ PATH="${PATH}:/asdf/.asdf/shims"
2332
2433USER asdf
2534WORKDIR /asdf
2635
27- RUN asdf plugin add golang
28- RUN asdf plugin add nodejs
29- ADD .tool-versions .
36+ RUN asdf plugin add golang \
37+ && asdf plugin add nodejs
38+ COPY .tool-versions .
3039
3140RUN asdf install
3241
@@ -37,7 +46,8 @@ RUN go install github.com/guseggert/glibc-check/cmd/glibc-check@v0.0.0-202111301
3746
3847ARG CACHEBUST=undefined
3948USER root
40- RUN apt-get update && apt-get -y upgrade
49+ RUN apt-get update && apt-get -y upgrade \
50+ && rm -rf /var/lib/apt/lists/*
4151
4252USER asdf
4353WORKDIR /build
0 commit comments