tools(docker): Update Ubuntu support (Fix #2188)
* Add Ubuntu 20.10 * Remove Ubuntu 16.04 LTS * Remove Ubuntu 19.10
This commit is contained in:
@@ -39,10 +39,9 @@ help:
|
||||
@echo -e "\t\t${BOLD}alpine-edge${RESET} (latest)"
|
||||
@echo -e "\t\t${BOLD}centos-8${RESET} (latest)"
|
||||
@echo -e "\t\t${BOLD}debian-10${RESET} (latest)"
|
||||
@echo -e "\t\t${BOLD}ubuntu-19.10${RESET} (Ubuntu latest)"
|
||||
@echo -e "\t\t${BOLD}ubuntu-20.10${RESET} (Ubuntu 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 -e "\t\t${BOLD}ubuntu-16.04${RESET} (Ubuntu 16.04 LTS)"
|
||||
@echo
|
||||
@echo -e "\t${BOLD}<stage>${RESET}:"
|
||||
@echo -e "\t\t${BOLD}env${RESET}"
|
||||
@@ -149,7 +148,7 @@ python: docker_python
|
||||
# $@ target name
|
||||
|
||||
# Currently supported distro
|
||||
DISTROS = alpine-edge centos-8 debian-10 ubuntu-20.04 ubuntu-19.10 ubuntu-18.04 ubuntu-16.04
|
||||
DISTROS = alpine-edge centos-8 debian-10 ubuntu-20.10 ubuntu-20.04 ubuntu-18.04
|
||||
STAGES = env devel third_party build
|
||||
|
||||
export/%/or-tools.snk: or-tools.snk | export
|
||||
|
||||
@@ -1,32 +0,0 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
RUN apt update \
|
||||
&& apt install -y -q build-essential zlib1g-dev \
|
||||
&& apt clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Install gcc 7
|
||||
RUN apt update -qq \
|
||||
&& apt install -yq software-properties-common \
|
||||
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
|
||||
&& apt update -qq \
|
||||
&& apt install -yq g++-7 \
|
||||
&& apt clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
# Configure alias
|
||||
RUN update-alternatives \
|
||||
--install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
|
||||
--slave /usr/bin/g++ g++ /usr/bin/g++-7 \
|
||||
--slave /usr/bin/gcov gcov /usr/bin/gcov-7 \
|
||||
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-7 \
|
||||
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-7 \
|
||||
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-7 \
|
||||
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-7
|
||||
|
||||
#ENV TZ=America/Los_Angeles
|
||||
#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
WORKDIR /root
|
||||
ADD or-tools_ubuntu-16.04_v*.tar.gz .
|
||||
|
||||
RUN cd or-tools_*_v* && make test_cc
|
||||
@@ -1,45 +0,0 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
RUN apt update -qq \
|
||||
&& apt install -y -q build-essential zlib1g-dev \
|
||||
&& apt clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Install gcc 7
|
||||
RUN apt update -qq \
|
||||
&& apt install -yq software-properties-common \
|
||||
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
|
||||
&& apt update -qq \
|
||||
&& apt install -yq g++-7 \
|
||||
&& apt clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
# Configure alias
|
||||
RUN update-alternatives \
|
||||
--install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
|
||||
--slave /usr/bin/g++ g++ /usr/bin/g++-7 \
|
||||
--slave /usr/bin/gcov gcov /usr/bin/gcov-7 \
|
||||
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-7 \
|
||||
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-7 \
|
||||
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-7 \
|
||||
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-7
|
||||
|
||||
# Dotnet install
|
||||
# see https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-1604
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y -q wget apt-transport-https \
|
||||
&& wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb \
|
||||
&& dpkg -i packages-microsoft-prod.deb \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y -q dotnet-sdk-3.1 \
|
||||
&& 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_ubuntu-16.04_v*.tar.gz .
|
||||
|
||||
RUN cd or-tools_*_v* && make test_dotnet
|
||||
@@ -1,33 +0,0 @@
|
||||
FROM ubuntu:16.04
|
||||
|
||||
RUN apt update \
|
||||
&& apt install -y -q build-essential zlib1g-dev default-jdk maven \
|
||||
&& apt clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
ENV JAVA_HOME=/usr/lib/jvm/default-java
|
||||
|
||||
# Install gcc 7
|
||||
RUN apt update -qq \
|
||||
&& apt install -yq software-properties-common \
|
||||
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
|
||||
&& apt update -qq \
|
||||
&& apt install -yq g++-7 \
|
||||
&& apt clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
# Configure alias
|
||||
RUN update-alternatives \
|
||||
--install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
|
||||
--slave /usr/bin/g++ g++ /usr/bin/g++-7 \
|
||||
--slave /usr/bin/gcov gcov /usr/bin/gcov-7 \
|
||||
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-7 \
|
||||
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-7 \
|
||||
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-7 \
|
||||
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-7
|
||||
|
||||
#ENV TZ=America/Los_Angeles
|
||||
#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
||||
|
||||
WORKDIR /root
|
||||
ADD or-tools_ubuntu-16.04_v*.tar.gz .
|
||||
|
||||
RUN cd or-tools_*_v* && make test_java
|
||||
@@ -1,14 +0,0 @@
|
||||
FROM ubuntu:19.10
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y -q build-essential zlib1g-dev \
|
||||
&& 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
|
||||
|
||||
WORKDIR /root
|
||||
ADD or-tools_ubuntu-19.10_v*.tar.gz .
|
||||
|
||||
RUN cd or-tools_*_v* && make test_cc
|
||||
@@ -1,15 +0,0 @@
|
||||
FROM ubuntu:19.10
|
||||
|
||||
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_ubuntu-19.10_v*.tar.gz .
|
||||
|
||||
RUN cd or-tools_*_v* && make test_java
|
||||
12
tools/docker/test/ubuntu-20.10/cc.Dockerfile
Normal file
12
tools/docker/test/ubuntu-20.10/cc.Dockerfile
Normal file
@@ -0,0 +1,12 @@
|
||||
FROM ubuntu:20.10
|
||||
|
||||
RUN apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq \
|
||||
build-essential zlib1g-dev \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
WORKDIR /root
|
||||
ADD or-tools_ubuntu-20.10_v*.tar.gz .
|
||||
|
||||
RUN cd or-tools_*_v* && make test_cc
|
||||
@@ -1,27 +1,25 @@
|
||||
FROM ubuntu:19.10
|
||||
FROM ubuntu:20.10
|
||||
|
||||
RUN apt-get update -qq \
|
||||
&& apt-get install -yq build-essential zlib1g-dev \
|
||||
&& DEBIAN_FRONTEND=noninteractive 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-1904
|
||||
# Dotnet Install
|
||||
# see https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-2010
|
||||
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 \
|
||||
&& wget -q https://packages.microsoft.com/config/ubuntu/20.10/packages-microsoft-prod.deb \
|
||||
&& dpkg -i packages-microsoft-prod.deb \
|
||||
&& apt-get update -qq \
|
||||
&& apt-get install -yq dotnet-sdk-3.1 \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq dotnet-sdk-3.1 \
|
||||
&& 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_ubuntu-19.10_v*.tar.gz .
|
||||
ADD or-tools_ubuntu-20.10_v*.tar.gz .
|
||||
|
||||
RUN cd or-tools_*_v* && make test_dotnet
|
||||
20
tools/docker/test/ubuntu-20.10/java.Dockerfile
Normal file
20
tools/docker/test/ubuntu-20.10/java.Dockerfile
Normal file
@@ -0,0 +1,20 @@
|
||||
FROM ubuntu:20.10
|
||||
|
||||
RUN apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq \
|
||||
build-essential zlib1g-dev \
|
||||
&& apt-get clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Java/Maven Install
|
||||
RUN apt-get update -qq \
|
||||
&& DEBIAN_FRONTEND=noninteractive 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
|
||||
|
||||
WORKDIR /root
|
||||
ADD or-tools_ubuntu-20.10_v*.tar.gz .
|
||||
|
||||
RUN cd or-tools_*_v* && make test_java
|
||||
@@ -1,103 +0,0 @@
|
||||
FROM ubuntu:16.04 AS env
|
||||
|
||||
#############
|
||||
## SETUP ##
|
||||
#############
|
||||
RUN apt update -qq \
|
||||
&& apt install -yq \
|
||||
git pkg-config wget make cmake autoconf libtool zlib1g-dev gawk g++ curl subversion \
|
||||
lsb-release libpcre3-dev \
|
||||
&& apt clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Install gcc 7
|
||||
RUN apt update -qq \
|
||||
&& apt install -yq software-properties-common \
|
||||
&& add-apt-repository -y ppa:ubuntu-toolchain-r/test \
|
||||
&& apt update -qq \
|
||||
&& apt install -yq g++-7 \
|
||||
&& apt clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
# Configure alias
|
||||
RUN update-alternatives \
|
||||
--install /usr/bin/gcc gcc /usr/bin/gcc-7 60 \
|
||||
--slave /usr/bin/g++ g++ /usr/bin/g++-7 \
|
||||
--slave /usr/bin/gcov gcov /usr/bin/gcov-7 \
|
||||
--slave /usr/bin/gcov-tool gcov-tool /usr/bin/gcov-tool-7 \
|
||||
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-7 \
|
||||
--slave /usr/bin/gcc-nm gcc-nm /usr/bin/gcc-nm-7 \
|
||||
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-7
|
||||
|
||||
# Install CMake 3.18.1
|
||||
RUN wget "https://cmake.org/files/v3.18/cmake-3.18.1-Linux-x86_64.sh" \
|
||||
&& chmod a+x cmake-3.18.1-Linux-x86_64.sh \
|
||||
&& ./cmake-3.18.1-Linux-x86_64.sh --prefix=/usr/local/ --skip-license \
|
||||
&& rm cmake-3.18.1-Linux-x86_64.sh
|
||||
|
||||
# Install SWIG 4.0.2
|
||||
RUN curl --location-trusted \
|
||||
--remote-name "https://downloads.sourceforge.net/project/swig/swig/swig-4.0.2/swig-4.0.2.tar.gz" \
|
||||
-o swig-4.0.2.tar.gz \
|
||||
&& tar xvf swig-4.0.2.tar.gz \
|
||||
&& rm swig-4.0.2.tar.gz \
|
||||
&& cd swig-4.0.2 \
|
||||
&& ./configure --prefix=/usr \
|
||||
&& make -j 4 \
|
||||
&& make install \
|
||||
&& cd .. \
|
||||
&& rm -rf swig-4.0.2
|
||||
|
||||
# Install Java (openjdk-8)
|
||||
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
|
||||
|
||||
# Dotnet Install
|
||||
# see https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-1604
|
||||
RUN apt-get update -qq \
|
||||
&& apt-get install -yq apt-transport-https \
|
||||
&& wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb \
|
||||
&& dpkg -i packages-microsoft-prod.deb \
|
||||
&& apt-get update -qq \
|
||||
&& apt-get install -yq dotnet-sdk-3.1 \
|
||||
&& 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
|
||||
|
||||
################
|
||||
## OR-TOOLS ##
|
||||
################
|
||||
FROM env AS devel
|
||||
# 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:-master}
|
||||
ARG SRC_GIT_SHA1
|
||||
ENV SRC_GIT_SHA1 ${SRC_GIT_SHA1:-unknown}
|
||||
|
||||
# Download sources
|
||||
# use SRC_GIT_SHA1 to modify the command
|
||||
# i.e. avoid docker reusing the cache when new commit is pushed
|
||||
WORKDIR /root
|
||||
RUN git clone -b "${SRC_GIT_BRANCH}" --single-branch https://github.com/google/or-tools \
|
||||
&& echo "sha1: $(cd or-tools && git rev-parse --verify HEAD)" \
|
||||
&& echo "expected sha1: ${SRC_GIT_SHA1}"
|
||||
|
||||
# Build third parties
|
||||
FROM devel AS third_party
|
||||
WORKDIR /root/or-tools
|
||||
RUN make detect && make third_party
|
||||
|
||||
# Build project
|
||||
FROM third_party AS build
|
||||
RUN make detect_cc && make cc
|
||||
RUN make detect_java && make java
|
||||
RUN make detect_dotnet && make dotnet
|
||||
@@ -1,21 +1,17 @@
|
||||
FROM ubuntu:19.10 AS env
|
||||
# Create a virtual environment with all tools installed
|
||||
# ref: https://hub.docker.com/_/ubuntu
|
||||
FROM ubuntu:20.10 AS env
|
||||
|
||||
#############
|
||||
## SETUP ##
|
||||
#############
|
||||
RUN apt update -qq \
|
||||
&& apt install -yq \
|
||||
git pkg-config wget make autoconf libtool zlib1g-dev gawk g++ curl subversion \
|
||||
&& DEBIAN_FRONTEND=noninteractive apt install -yq \
|
||||
git pkg-config wget make cmake autoconf libtool zlib1g-dev gawk g++ curl subversion \
|
||||
lsb-release \
|
||||
&& apt clean \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Install CMake 3.18.1
|
||||
RUN wget "https://cmake.org/files/v3.18/cmake-3.18.1-Linux-x86_64.sh" \
|
||||
&& chmod a+x cmake-3.18.1-Linux-x86_64.sh \
|
||||
&& ./cmake-3.18.1-Linux-x86_64.sh --prefix=/usr/local/ --skip-license \
|
||||
&& rm cmake-3.18.1-Linux-x86_64.sh
|
||||
|
||||
# Swig Install
|
||||
RUN apt-get update -qq \
|
||||
&& apt-get install -yq swig \
|
||||
@@ -30,9 +26,11 @@ RUN apt-get update -qq \
|
||||
ENV JAVA_HOME=/usr/lib/jvm/default-java
|
||||
|
||||
# Dotnet Install
|
||||
# see:
|
||||
# https://docs.microsoft.com/en-us/dotnet/core/install/linux-package-manager-ubuntu-2010
|
||||
RUN apt-get update -qq \
|
||||
&& apt-get install -yq apt-transport-https \
|
||||
&& wget -q https://packages.microsoft.com/config/ubuntu/19.04/packages-microsoft-prod.deb \
|
||||
&& wget -q https://packages.microsoft.com/config/ubuntu/20.10/packages-microsoft-prod.deb \
|
||||
&& dpkg -i packages-microsoft-prod.deb \
|
||||
&& apt-get update -qq \
|
||||
&& apt-get install -yq dotnet-sdk-3.1 \
|
||||
Reference in New Issue
Block a user