From cce76e9c53d4c54227e9b6fd13f3f33322538506 Mon Sep 17 00:00:00 2001 From: Corentin Le Molgat Date: Mon, 24 Jul 2023 14:28:28 +0200 Subject: [PATCH] tools/docker: Remove ubuntu-18.04 support * default python 3.6 is too old --- tools/docker/Makefile | 3 +- tools/docker/images/ubuntu-18.04.Dockerfile | 125 ------------------ tools/docker/test/ubuntu-18.04/cpp.Dockerfile | 33 ----- .../test/ubuntu-18.04/dotnet.Dockerfile | 28 ---- .../docker/test/ubuntu-18.04/java.Dockerfile | 16 --- .../test/ubuntu-18.04/python.Dockerfile | 12 -- 6 files changed, 1 insertion(+), 216 deletions(-) delete mode 100644 tools/docker/images/ubuntu-18.04.Dockerfile delete mode 100644 tools/docker/test/ubuntu-18.04/cpp.Dockerfile delete mode 100644 tools/docker/test/ubuntu-18.04/dotnet.Dockerfile delete mode 100644 tools/docker/test/ubuntu-18.04/java.Dockerfile delete mode 100644 tools/docker/test/ubuntu-18.04/python.Dockerfile diff --git a/tools/docker/Makefile b/tools/docker/Makefile index 67a52e6b7c8..a152a8fac54 100644 --- a/tools/docker/Makefile +++ b/tools/docker/Makefile @@ -106,7 +106,6 @@ help: @echo -e "\t\t${BOLD}ubuntu-22.10${RESET} (Ubuntu 22.10)" @echo -e "\t\t${BOLD}ubuntu-22.04${RESET} (Ubuntu 22.04 LTS, latest)" @echo -e "\t\t${BOLD}ubuntu-20.04${RESET} (Ubuntu 20.04 LTS)" - @echo -e "\t\t${BOLD}ubuntu-18.04${RESET} (Ubuntu 18.04 LTS)" @echo @echo -e "\t${BOLD}${RESET}:" @echo -e "\t\t${BOLD}env${RESET}" @@ -409,7 +408,7 @@ DISTROS := \ debian-10 debian-11 debian-sid \ fedora-33 fedora-34 fedora-35 fedora-36 fedora-37 fedora-38 \ opensuse-leap \ - ubuntu-18.04 ubuntu-20.04 ubuntu-22.04 ubuntu-22.10 ubuntu-23.04 + ubuntu-20.04 ubuntu-22.04 ubuntu-22.10 ubuntu-23.04 # List of stages STAGES := env devel diff --git a/tools/docker/images/ubuntu-18.04.Dockerfile b/tools/docker/images/ubuntu-18.04.Dockerfile deleted file mode 100644 index b1cf3b80bba..00000000000 --- a/tools/docker/images/ubuntu-18.04.Dockerfile +++ /dev/null @@ -1,125 +0,0 @@ -# ref: https://hub.docker.com/_/ubuntu -FROM ubuntu:18.04 AS env - -############# -## SETUP ## -############# -RUN apt update -qq \ -&& apt install -yq git wget build-essential lsb-release zlib1g-dev \ -&& apt clean \ -&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -# GCC 11 -RUN apt update -qq \ -&& apt install -yq software-properties-common \ -&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \ -&& apt install -yq gcc-11 g++-11 \ -&& apt clean \ -&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -ENV CC=gcc-11 CXX=g++-11 -ENTRYPOINT ["/bin/bash", "-c"] -CMD ["/bin/bash"] - -# Install CMake v3.26.4 -RUN ARCH=$(uname -m) \ -&& wget -q "https://cmake.org/files/v3.26/cmake-3.26.4-linux-${ARCH}.sh" \ -&& chmod a+x cmake-3.26.4-linux-${ARCH}.sh \ -&& ./cmake-3.26.4-linux-${ARCH}.sh --prefix=/usr/local/ --skip-license \ -&& rm cmake-3.26.4-linux-${ARCH}.sh - -# Install SWIG -RUN apt-get update -qq \ -&& apt-get install -yq swig \ -&& apt-get clean \ -&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -# Install .Net -# see: https://docs.microsoft.com/en-us/dotnet/core/install/linux-ubuntu#1804- -RUN apt-get update -qq \ -&& apt-get install -yq apt-transport-https \ -&& wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb \ -&& dpkg -i packages-microsoft-prod.deb \ -&& apt-get update -qq \ -&& apt-get install -yq dotnet-sdk-3.1 dotnet-sdk-6.0 \ -&& apt-get clean \ -&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -# Trigger first run experience by running arbitrary cmd -RUN dotnet --info - -# Install Java (openjdk-11) -RUN apt-get update -qq \ -&& apt-get install -yq default-jdk maven \ -&& apt-get clean \ -&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -ENV JAVA_HOME=/usr/lib/jvm/default-java - -# Install Python -RUN apt-get update -qq \ -&& apt-get install -qq python3 python3-dev python3-pip python3-venv \ -&& apt-get clean \ -&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -ENV TZ=America/Los_Angeles -RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -################ -## OR-TOOLS ## -################ -FROM env AS devel -WORKDIR /root -# Copy the snk key -COPY or-tools.snk /root/or-tools.snk -ENV DOTNET_SNK=/root/or-tools.snk - -ARG SRC_GIT_BRANCH -ENV SRC_GIT_BRANCH ${SRC_GIT_BRANCH:-main} -ARG SRC_GIT_SHA1 -ENV SRC_GIT_SHA1 ${SRC_GIT_SHA1:-unknown} - -ARG OR_TOOLS_PATCH -ENV OR_TOOLS_PATCH ${OR_TOOLS_PATCH:-9999} - -# Download sources -# use SRC_GIT_SHA1 to modify the command -# i.e. avoid docker reusing the cache when new commit is pushed -SHELL ["/bin/bash", "-c"] -RUN git clone -b "${SRC_GIT_BRANCH}" --single-branch --depth=1 https://github.com/google/or-tools \ -&& [[ $(cd or-tools && git rev-parse --verify HEAD) == ${SRC_GIT_SHA1} ]] -WORKDIR /root/or-tools - -# C++ -## build -FROM devel AS cpp_build -RUN make detect_cpp \ -&& make cpp JOBS=8 -## archive -FROM cpp_build AS cpp_archive -RUN make archive_cpp - -# .Net -## build -FROM cpp_build AS dotnet_build -ENV USE_DOTNET_CORE_31=ON -RUN make detect_dotnet \ -&& make dotnet JOBS=8 -## archive -FROM dotnet_build AS dotnet_archive -RUN make archive_dotnet - -# Java -## build -FROM cpp_build AS java_build -RUN make detect_java \ -&& make java JOBS=8 -## archive -FROM java_build AS java_archive -RUN make archive_java - -# Python -## build -FROM cpp_build AS python_build -RUN make detect_python \ -&& make python JOBS=8 -## archive -FROM python_build AS python_archive -RUN make archive_python diff --git a/tools/docker/test/ubuntu-18.04/cpp.Dockerfile b/tools/docker/test/ubuntu-18.04/cpp.Dockerfile deleted file mode 100644 index cee16412047..00000000000 --- a/tools/docker/test/ubuntu-18.04/cpp.Dockerfile +++ /dev/null @@ -1,33 +0,0 @@ -# ref: https://hub.docker.com/_/ubuntu -FROM ubuntu:18.04 - -RUN apt-get update \ -&& apt-get install -yq wget build-essential zlib1g-dev \ -&& apt-get clean \ -&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -# GCC 11 -RUN apt update -qq \ -&& apt install -yq software-properties-common \ -&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \ -&& apt install -yq gcc-11 g++-11 \ -&& apt clean \ -&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -ENV CC=gcc-11 CXX=g++-11 -ENTRYPOINT ["/bin/bash", "-c"] -CMD ["/bin/bash"] - -# Install CMake v3.26.4 -RUN ARCH=$(uname -m) \ -&& wget -q "https://cmake.org/files/v3.26/cmake-3.26.4-linux-${ARCH}.sh" \ -&& chmod a+x cmake-3.26.4-linux-${ARCH}.sh \ -&& ./cmake-3.26.4-linux-${ARCH}.sh --prefix=/usr/local/ --skip-license \ -&& rm cmake-3.26.4-linux-${ARCH}.sh - -#ENV TZ=America/Los_Angeles -#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -WORKDIR /root -ADD or-tools_amd64_ubuntu-18.04_cpp_v*.tar.gz . - -RUN cd or-tools_*_v* && make test diff --git a/tools/docker/test/ubuntu-18.04/dotnet.Dockerfile b/tools/docker/test/ubuntu-18.04/dotnet.Dockerfile deleted file mode 100644 index 4a64db1cc72..00000000000 --- a/tools/docker/test/ubuntu-18.04/dotnet.Dockerfile +++ /dev/null @@ -1,28 +0,0 @@ -# ref: https://hub.docker.com/_/ubuntu -FROM ubuntu:18.04 - -RUN apt-get update -qq \ -&& apt-get install -yq build-essential zlib1g-dev \ -&& apt-get clean \ -&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -# Dotnet install -# see https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-1804 -RUN apt-get update -qq \ -&& apt-get install -yq wget apt-transport-https \ -&& wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb \ -&& dpkg -i packages-microsoft-prod.deb \ -&& apt-get update -qq \ -&& apt-get install -yq dotnet-sdk-3.1 dotnet-sdk-6.0\ -&& apt-get clean \ -&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -# Trigger first run experience by running arbitrary cmd -RUN dotnet --info - -#ENV TZ=America/Los_Angeles -#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -WORKDIR /root -ADD or-tools_amd64_ubuntu-18.04_dotnet_v*.tar.gz . - -RUN cd or-tools_*_v* && make test diff --git a/tools/docker/test/ubuntu-18.04/java.Dockerfile b/tools/docker/test/ubuntu-18.04/java.Dockerfile deleted file mode 100644 index 7f8ffa46465..00000000000 --- a/tools/docker/test/ubuntu-18.04/java.Dockerfile +++ /dev/null @@ -1,16 +0,0 @@ -# ref: https://hub.docker.com/_/ubuntu -FROM ubuntu:18.04 - -RUN apt-get update -qq \ -&& apt-get install -y -q build-essential zlib1g-dev default-jdk maven \ -&& apt-get clean \ -&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* -ENV JAVA_HOME=/usr/lib/jvm/default-java - -#ENV TZ=America/Los_Angeles -#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone - -WORKDIR /root -ADD or-tools_amd64_ubuntu-18.04_java_v*.tar.gz . - -RUN cd or-tools_*_v* && make test diff --git a/tools/docker/test/ubuntu-18.04/python.Dockerfile b/tools/docker/test/ubuntu-18.04/python.Dockerfile deleted file mode 100644 index 2292e41089b..00000000000 --- a/tools/docker/test/ubuntu-18.04/python.Dockerfile +++ /dev/null @@ -1,12 +0,0 @@ -# ref: https://hub.docker.com/_/ubuntu -FROM ubuntu:18.04 - -RUN apt-get update \ -&& apt-get install -yq make \ -&& apt-get clean \ -&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* - -WORKDIR /root -ADD or-tools_amd64_ubuntu-18.04_python_v*.tar.gz . - -RUN cd or-tools_*_v* && make test