From 373c32f91a62bcb8b726728f3c45929bb7dafa02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Tue, 20 Feb 2024 00:00:51 +0200 Subject: [PATCH] docker: Bump the base images to Ubuntu 22.04 This raises the versions of bundled software, providing e.g. autoconf 2.71, which is needed for Python 3.12. As the releases are built (without a surrounding extra container) on GitHub Actions these days, we don't need to hold the docker images back to an old version for the sake of compatibility; instead, updating to a newer version provides more modern tools for users of the docker image. --- Dockerfile | 12 +----------- Dockerfile.cross | 12 ------------ Dockerfile.dev | 12 +----------- Dockerfile.toolchain | 12 +----------- release.sh | 2 +- 5 files changed, 4 insertions(+), 46 deletions(-) diff --git a/Dockerfile b/Dockerfile index be472c5..550db90 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update -qq && \ DEBIAN_FRONTEND="noninteractive" apt-get install -qqy --no-install-recommends \ @@ -8,16 +8,6 @@ RUN apt-get update -qq && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* -# Manually install a newer version of CMake; this is needed since building -# LLVM requires CMake 3.20, while Ubuntu 20.04 ships with 3.16.3. If -# updating to a newer distribution, this can be dropped. -RUN cd /opt && \ - curl -LO https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-Linux-$(uname -m).tar.gz && \ - tar -zxf cmake-*.tar.gz && \ - rm cmake-*.tar.gz && \ - mv cmake-* cmake -ENV PATH=/opt/cmake/bin:$PATH - RUN git config --global user.name "LLVM MinGW" && \ git config --global user.email root@localhost diff --git a/Dockerfile.cross b/Dockerfile.cross index 2cc6471..f41d0e5 100644 --- a/Dockerfile.cross +++ b/Dockerfile.cross @@ -16,18 +16,6 @@ RUN apt-get update -qq && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* -# Install Autoconf 2.71. Ubuntu 20.04 comes with Autoconf 2.69, but -# libffi 3.4.3 or newer requres Autoconf 2.71. -RUN curl -LO https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.xz && \ - tar -Jxvf autoconf-*.tar.xz && \ - rm autoconf-*.tar.xz && \ - cd autoconf-* && \ - ./configure --prefix=/opt/autotools && \ - make -j$(nproc) install && \ - rm -rf autoconf-* - -ENV PATH=/opt/autotools/bin:$PATH - COPY build-python.sh . ARG WITH_PYTHON diff --git a/Dockerfile.dev b/Dockerfile.dev index 829e9c0..d0bdfd7 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update -qq && \ DEBIAN_FRONTEND="noninteractive" apt-get install -qqy --no-install-recommends \ @@ -8,16 +8,6 @@ RUN apt-get update -qq && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* -# Manually install a newer version of CMake; this is needed since building -# LLVM requires CMake 3.20, while Ubuntu 20.04 ships with 3.16.3. If -# updating to a newer distribution, this can be dropped. -RUN cd /opt && \ - curl -LO https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-Linux-$(uname -m).tar.gz && \ - tar -zxf cmake-*.tar.gz && \ - rm cmake-*.tar.gz && \ - mv cmake-* cmake -ENV PATH=/opt/cmake/bin:$PATH - RUN git config --global user.name "LLVM MinGW" && \ git config --global user.email root@localhost diff --git a/Dockerfile.toolchain b/Dockerfile.toolchain index d00a116..344a858 100644 --- a/Dockerfile.toolchain +++ b/Dockerfile.toolchain @@ -1,4 +1,4 @@ -FROM ubuntu:20.04 +FROM ubuntu:22.04 RUN apt-get update -qq && \ DEBIAN_FRONTEND="noninteractive" apt-get install -qqy --no-install-recommends \ @@ -8,16 +8,6 @@ RUN apt-get update -qq && \ apt-get clean -y && \ rm -rf /var/lib/apt/lists/* -# Manually install a newer version of CMake; this is needed since building -# LLVM requires CMake 3.20, while Ubuntu 20.04 ships with 3.16.3. If -# updating to a newer distribution, this can be dropped. -RUN cd /opt && \ - curl -LO https://github.com/Kitware/CMake/releases/download/v3.26.4/cmake-3.26.4-Linux-$(uname -m).tar.gz && \ - tar -zxf cmake-*.tar.gz && \ - rm cmake-*.tar.gz && \ - mv cmake-* cmake -ENV PATH=/opt/cmake/bin:$PATH - RUN git config --global user.name "LLVM MinGW" && \ git config --global user.email root@localhost diff --git a/release.sh b/release.sh index d621e7b..78c250f 100755 --- a/release.sh +++ b/release.sh @@ -29,7 +29,7 @@ fi time docker build -f Dockerfile . -t mstorsjo/llvm-mingw:latest -t mstorsjo/llvm-mingw:$TAG -DISTRO=ubuntu-20.04-$(uname -m) +DISTRO=ubuntu-22.04-$(uname -m) docker run --rm mstorsjo/llvm-mingw:latest sh -c "cd /opt && mv llvm-mingw llvm-mingw-$TAG-ucrt-$DISTRO && tar -Jcvf - --format=ustar --numeric-owner --owner=0 --group=0 llvm-mingw-$TAG-ucrt-$DISTRO" > llvm-mingw-$TAG-ucrt-$DISTRO.tar.xz if [ -n "$NATIVEONLY" ]; then