From 6d4150e9d298c4b48a658af60c98e3ab4c6f3dbe Mon Sep 17 00:00:00 2001 From: Corentin Le Molgat Date: Tue, 25 Jul 2023 20:25:07 +0200 Subject: [PATCH] tools/docker: update --- tools/docker/Makefile | 3 +- tools/docker/images/centos-8.Dockerfile | 122 ------------------- tools/docker/images/debian-10.Dockerfile | 1 + tools/docker/images/debian-11.Dockerfile | 1 + tools/docker/images/debian-sid.Dockerfile | 1 + tools/docker/images/fedora-37.Dockerfile | 1 + tools/docker/images/fedora-38.Dockerfile | 1 + tools/docker/images/fedora-39.Dockerfile | 1 + tools/docker/images/opensuse-leap.Dockerfile | 2 +- tools/docker/images/ubuntu-20.04.Dockerfile | 1 + tools/docker/images/ubuntu-22.04.Dockerfile | 1 + tools/docker/images/ubuntu-22.10.Dockerfile | 1 + tools/docker/images/ubuntu-23.04.Dockerfile | 1 + tools/docker/test/centos-8/cpp.Dockerfile | 32 ----- tools/docker/test/centos-8/dotnet.Dockerfile | 25 ---- tools/docker/test/centos-8/java.Dockerfile | 22 ---- tools/docker/test/centos-8/python.Dockerfile | 18 --- 17 files changed, 12 insertions(+), 222 deletions(-) delete mode 100644 tools/docker/images/centos-8.Dockerfile delete mode 100644 tools/docker/test/centos-8/cpp.Dockerfile delete mode 100644 tools/docker/test/centos-8/dotnet.Dockerfile delete mode 100644 tools/docker/test/centos-8/java.Dockerfile delete mode 100644 tools/docker/test/centos-8/python.Dockerfile diff --git a/tools/docker/Makefile b/tools/docker/Makefile index 8953782586f..cb8ddd9ee70 100644 --- a/tools/docker/Makefile +++ b/tools/docker/Makefile @@ -91,7 +91,6 @@ help: @echo -e "\t${BOLD}${RESET}:" @echo -e "\t\t${BOLD}alpine-edge${RESET} (latest)" @echo -e "\t\t${BOLD}archlinux${RESET} (latest)" - @echo -e "\t\t${BOLD}centos-8${RESET} (Centos Stream 8)" @echo -e "\t\t${BOLD}centos-7${RESET} (Centos 7 LTS)" @echo -e "\t\t${BOLD}debian-sid${RESET} (unstable)" @echo -e "\t\t${BOLD}debian-11${RESET} (bullseye, latest)" @@ -402,7 +401,7 @@ PLATFORMS := amd64 arm64 # riscv64 DISTROS := \ alpine-edge \ archlinux \ - centos-7 centos-8 \ + centos-7 \ debian-10 debian-11 debian-sid \ fedora-37 fedora-38 fedora-39 \ opensuse-leap \ diff --git a/tools/docker/images/centos-8.Dockerfile b/tools/docker/images/centos-8.Dockerfile deleted file mode 100644 index ba963dee6f3..00000000000 --- a/tools/docker/images/centos-8.Dockerfile +++ /dev/null @@ -1,122 +0,0 @@ -# ref: https://quay.io/repository/centos/centos -FROM quay.io/centos/centos:stream8 AS env - -############# -## SETUP ## -############# -RUN dnf -y update \ -&& dnf -y groupinstall 'Development Tools' \ -&& dnf -y install wget redhat-lsb-core pkgconfig autoconf libtool zlib-devel which \ -&& dnf clean all \ -&& rm -rf /var/cache/dnf - -# Install system build dependencies -ENV PATH=/usr/local/bin:$PATH -RUN dnf -y update \ -&& dnf -y install gcc-toolset-11 \ -&& dnf clean all \ -&& rm -rf /var/cache/dnf \ -&& echo "source /opt/rh/gcc-toolset-11/enable" >> /etc/bashrc -SHELL ["/usr/bin/bash", "--login", "-c"] -ENTRYPOINT ["/usr/bin/bash", "--login", "-c"] -CMD ["/usr/bin/bash", "--login"] -# RUN g++ --version - -# 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 dnf -y update \ -&& dnf -y install swig \ -&& dnf clean all \ -&& rm -rf /var/cache/dnf - -# Install .Net -# see https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-centos8 -RUN dnf -y update \ -&& dnf -y install dotnet-sdk-3.1 dotnet-sdk-6.0 \ -&& dnf clean all \ -&& rm -rf /var/cache/dnf -# Trigger first run experience by running arbitrary cmd -RUN dotnet --info - -# Install Java 8 SDK -RUN dnf -y update \ -&& dnf -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel maven \ -&& dnf clean all \ -&& rm -rf /var/cache/dnf -ENV JAVA_HOME=/usr/lib/jvm/java - -# Install Python -RUN dnf -y update \ -&& dnf -y install python3 python3-devel python3-pip python3-numpy \ -&& dnf clean all \ -&& rm -rf /var/cache/dnf - -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 -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/images/debian-10.Dockerfile b/tools/docker/images/debian-10.Dockerfile index 58b3079ae63..450a3bb40e9 100644 --- a/tools/docker/images/debian-10.Dockerfile +++ b/tools/docker/images/debian-10.Dockerfile @@ -46,6 +46,7 @@ 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/* +RUN python3 -m pip install absl-py mypy-protobuf ENV TZ=America/Los_Angeles RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/tools/docker/images/debian-11.Dockerfile b/tools/docker/images/debian-11.Dockerfile index 2376d8d0277..e06ecef0bc8 100644 --- a/tools/docker/images/debian-11.Dockerfile +++ b/tools/docker/images/debian-11.Dockerfile @@ -46,6 +46,7 @@ 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/* +RUN python3 -m pip install absl-py mypy-protobuf ENV TZ=America/Los_Angeles RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/tools/docker/images/debian-sid.Dockerfile b/tools/docker/images/debian-sid.Dockerfile index 026558d5296..5f1f56420ee 100644 --- a/tools/docker/images/debian-sid.Dockerfile +++ b/tools/docker/images/debian-sid.Dockerfile @@ -43,6 +43,7 @@ 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/* +RUN python3 -m pip install absl-py mypy-protobuf ENV TZ=America/Los_Angeles RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/tools/docker/images/fedora-37.Dockerfile b/tools/docker/images/fedora-37.Dockerfile index 07856d1f8e1..d48bfa5fd3b 100644 --- a/tools/docker/images/fedora-37.Dockerfile +++ b/tools/docker/images/fedora-37.Dockerfile @@ -36,6 +36,7 @@ ENV JAVA_HOME=/usr/lib/jvm/java-openjdk RUN dnf -y update \ && dnf -y install python3 python3-devel python3-pip \ && dnf clean all +RUN python3 -m pip install absl-py mypy-protobuf ################ ## OR-TOOLS ## diff --git a/tools/docker/images/fedora-38.Dockerfile b/tools/docker/images/fedora-38.Dockerfile index 945053dc8ce..50daae95003 100644 --- a/tools/docker/images/fedora-38.Dockerfile +++ b/tools/docker/images/fedora-38.Dockerfile @@ -36,6 +36,7 @@ ENV JAVA_HOME=/usr/lib/jvm/java-openjdk RUN dnf -y update \ && dnf -y install python3 python3-devel python3-pip \ && dnf clean all +RUN python3 -m pip install absl-py mypy-protobuf ################ ## OR-TOOLS ## diff --git a/tools/docker/images/fedora-39.Dockerfile b/tools/docker/images/fedora-39.Dockerfile index 107480df76f..be5d03c5369 100644 --- a/tools/docker/images/fedora-39.Dockerfile +++ b/tools/docker/images/fedora-39.Dockerfile @@ -36,6 +36,7 @@ ENV JAVA_HOME=/usr/lib/jvm/java-openjdk RUN dnf -y update \ && dnf -y install python3 python3-devel python3-pip \ && dnf clean all +RUN python3 -m pip install absl-py mypy-protobuf ################ ## OR-TOOLS ## diff --git a/tools/docker/images/opensuse-leap.Dockerfile b/tools/docker/images/opensuse-leap.Dockerfile index 52614856ece..502eaca2314 100644 --- a/tools/docker/images/opensuse-leap.Dockerfile +++ b/tools/docker/images/opensuse-leap.Dockerfile @@ -59,7 +59,7 @@ RUN zypper install -y java-1_8_0-openjdk java-1_8_0-openjdk-devel maven \ # Install Python RUN zypper install -y python3-devel python3-pip python3-wheel \ && zypper clean -a -#RUN python3 -m pip install absl-py mypy-protobuf +RUN python3 -m pip install absl-py mypy-protobuf ################ ## OR-TOOLS ## diff --git a/tools/docker/images/ubuntu-20.04.Dockerfile b/tools/docker/images/ubuntu-20.04.Dockerfile index 3c567ba88d5..1c08a7e5dba 100644 --- a/tools/docker/images/ubuntu-20.04.Dockerfile +++ b/tools/docker/images/ubuntu-20.04.Dockerfile @@ -51,6 +51,7 @@ 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/* +RUN python3 -m pip install absl-py mypy-protobuf ENV TZ=America/Los_Angeles RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/tools/docker/images/ubuntu-22.04.Dockerfile b/tools/docker/images/ubuntu-22.04.Dockerfile index 0b2bbdb911d..0d634b66177 100644 --- a/tools/docker/images/ubuntu-22.04.Dockerfile +++ b/tools/docker/images/ubuntu-22.04.Dockerfile @@ -42,6 +42,7 @@ 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/* +RUN python3 -m pip install absl-py mypy-protobuf ENV TZ=America/Los_Angeles RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/tools/docker/images/ubuntu-22.10.Dockerfile b/tools/docker/images/ubuntu-22.10.Dockerfile index 1ab7c6dc1e3..711a735eebd 100644 --- a/tools/docker/images/ubuntu-22.10.Dockerfile +++ b/tools/docker/images/ubuntu-22.10.Dockerfile @@ -42,6 +42,7 @@ 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/* +RUN python3 -m pip install absl-py mypy-protobuf ENV TZ=America/Los_Angeles RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/tools/docker/images/ubuntu-23.04.Dockerfile b/tools/docker/images/ubuntu-23.04.Dockerfile index 8eb951eca15..1d3dcd3f475 100644 --- a/tools/docker/images/ubuntu-23.04.Dockerfile +++ b/tools/docker/images/ubuntu-23.04.Dockerfile @@ -41,6 +41,7 @@ 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/* +RUN python3 -m pip install absl-py mypy-protobuf ENV TZ=America/Los_Angeles RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone diff --git a/tools/docker/test/centos-8/cpp.Dockerfile b/tools/docker/test/centos-8/cpp.Dockerfile deleted file mode 100644 index 7bbebe07615..00000000000 --- a/tools/docker/test/centos-8/cpp.Dockerfile +++ /dev/null @@ -1,32 +0,0 @@ -# ref: https://quay.io/repository/centos/centos -FROM quay.io/centos/centos:stream8 - -RUN dnf -y update \ -&& dnf -y groupinstall 'Development Tools' \ -&& dnf -y install zlib-devel \ -&& dnf clean all \ -&& rm -rf /var/cache/dnf - -# Install system build dependencies -ENV PATH=/usr/local/bin:$PATH -RUN dnf -y update \ -&& dnf -y install gcc-toolset-11 \ -&& dnf clean all \ -&& rm -rf /var/cache/dnf \ -&& echo "source /opt/rh/gcc-toolset-11/enable" >> /etc/bashrc -SHELL ["/usr/bin/bash", "--login", "-c"] -ENTRYPOINT ["/usr/bin/bash", "--login", "-c"] -CMD ["/usr/bin/bash", "--login"] -# RUN g++ --version - -# 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 - -WORKDIR /root -ADD or-tools_amd64_centos-8_cpp_v*.tar.gz . - -RUN cd or-tools_*_v* && make test diff --git a/tools/docker/test/centos-8/dotnet.Dockerfile b/tools/docker/test/centos-8/dotnet.Dockerfile deleted file mode 100644 index 67c659d16f9..00000000000 --- a/tools/docker/test/centos-8/dotnet.Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -# ref: https://quay.io/repository/centos/centos -FROM quay.io/centos/centos:stream8 - -RUN dnf -y update \ -&& dnf -y groupinstall 'Development Tools' \ -&& dnf -y install zlib-devel \ -&& dnf clean all \ -&& rm -rf /var/cache/dnf - -# Install .Net -# see https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-centos8 -RUN dnf -y update \ -&& dnf -y install dotnet-sdk-3.1 dotnet-sdk-6.0 \ -&& dnf clean all \ -&& rm -rf /var/cache/dnf -# 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_centos-8_dotnet_v*.tar.gz . - -RUN cd or-tools_*_v* && make test diff --git a/tools/docker/test/centos-8/java.Dockerfile b/tools/docker/test/centos-8/java.Dockerfile deleted file mode 100644 index d7746e6c3d3..00000000000 --- a/tools/docker/test/centos-8/java.Dockerfile +++ /dev/null @@ -1,22 +0,0 @@ -# ref: https://quay.io/repository/centos/centos -FROM quay.io/centos/centos:stream8 - -RUN dnf -y update \ -&& dnf -y groupinstall 'Development Tools' \ -&& dnf -y install zlib-devel \ -&& dnf clean all \ -&& rm -rf /var/cache/dnf - -RUN dnf -y update \ -&& dnf -y install java-1.8.0-openjdk java-1.8.0-openjdk-devel maven \ -&& dnf clean all \ -&& rm -rf /var/cache/dnf -ENV JAVA_HOME=/usr/lib/jvm/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_centos-8_java_v*.tar.gz . - -RUN cd or-tools_*_v* && make test diff --git a/tools/docker/test/centos-8/python.Dockerfile b/tools/docker/test/centos-8/python.Dockerfile deleted file mode 100644 index ac4b5fe20d3..00000000000 --- a/tools/docker/test/centos-8/python.Dockerfile +++ /dev/null @@ -1,18 +0,0 @@ -# ref: https://quay.io/repository/centos/centos -FROM quay.io/centos/centos:stream8 - -RUN dnf -y update \ -&& dnf -y groupinstall 'Development Tools' \ -&& dnf clean all \ -&& rm -rf /var/cache/dnf - -# Install Python -RUN dnf -y update \ -&& dnf -y install python3 python3-devel python3-pip \ -&& dnf clean all \ -&& rm -rf /var/cache/dnf - -WORKDIR /root -ADD or-tools_amd64_centos-8_python_v*.tar.gz . - -RUN cd or-tools_*_v* && make test