Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ def defineModernBaseImageData(Map envValues, String pr_number, String registry,
imageData["buildArgs"]["CONAN_VERSION"] = conanVersion
imageData["buildArgs"]["CMAKE_VERSION"] = envValues["CMAKE_VERSION"]
imageData["buildArgs"]['PYTHON_VERSION'] = envValues["PYTHON_VERSION"]
imageData["buildArgs"]['PYTHON_SECOND_VERSION'] = envValues["PYTHON_SECOND_VERSION"]
imageData["buildArgs"]['OPENSSL_VERSION'] = envValues["OPENSSL_VERSION"]
imageData["name"] = getModernImageName(imageData, registry)
// pull images from registry to be used as cache
String masterImageName = getImageMasterName(imageData)
Expand All @@ -108,6 +110,8 @@ def defineModernImagesData(String compiler, String compilerVersion, Map envValue
builderImage["buildArgs"]["BUILDKIT_INLINE_CACHE"] = "1" // Enable BuildKit cache
builderImage["buildArgs"]["CMAKE_VERSION"] = envValues["CMAKE_VERSION"]
builderImage["buildArgs"]['PYTHON_VERSION'] = envValues["PYTHON_VERSION"]
builderImage["buildArgs"]['PYTHON_SECOND_VERSION'] = envValues["PYTHON_SECOND_VERSION"]
builderImage["buildArgs"]['OPENSSL_VERSION'] = envValues["OPENSSL_VERSION"]
builderImage["buildArgs"]['LIBSTDCPP_VERSION'] = envValues["LIBSTDCPP_VERSION"]
builderImage["buildArgs"]['LIBSTDCPP_PATCH_VERSION'] = envValues["LIBSTDCPP_PATCH_VERSION"]
builderImage["buildArgs"]['LIBSTDCPP_MAJOR_VERSION'] = envValues["LIBSTDCPP_MAJOR_VERSION"]
Expand Down
2 changes: 2 additions & 0 deletions images/.env
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ DOCKERHUB_USERNAME=conanio
# This versions are mandatory by 'conan-io/conan-center-index'
CMAKE_VERSION=3.15.7
PYTHON_VERSION=3.7.17
PYTHON_SECOND_VERSION=3.12.7
OPENSSL_VERSION=3.5.0
LIBSTDCPP_VERSION=10.3.0
LIBSTDCPP_PATCH_VERSION=28
LIBSTDCPP_MAJOR_VERSION=10
Expand Down
24 changes: 22 additions & 2 deletions images/base/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@ COPY conan.lock conanfile.txt /opt/conan/
RUN apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends software-properties-common \
&& add-apt-repository ppa:git-core/ppa -y \
&& apt-get -qq update \
&& apt-get -qq install -y --no-install-recommends --no-install-suggests -o=Dpkg::Use-Pty=0 \
&& apt-get -qq update

RUN apt-get -qq install -y --no-install-recommends --no-install-suggests -o=Dpkg::Use-Pty=0 \
sudo \
binutils \
wget \
Expand Down Expand Up @@ -92,6 +93,25 @@ RUN wget --no-check-certificate --quiet -O /tmp/pyenv-installer https://raw.gith
&& ln -s /usr/share/pyshared/lsb_release.py /opt/pyenv/versions/${PYTHON_VERSION}/lib/python${PYTHON_VERSION%.*}/site-packages/lsb_release.py \
&& pip install -q --upgrade --no-cache-dir pip

# Python +3.10 requires OpenSSL +1.1.x, but Ubuntu 16.04 LTS ships with OpenSSL 1.0.x
ARG OPENSSL_VERSION

RUN wget --no-check-certificate --quiet -O /tmp/openssl.tar.gz https://github.com/openssl/openssl/releases/download/openssl-${OPENSSL_VERSION}/openssl-${OPENSSL_VERSION}.tar.gz \
&& tar -xzf /tmp/openssl.tar.gz -C /tmp \
&& cd /tmp/openssl-${OPENSSL_VERSION} \
&& ./Configure linux-x86_64 --prefix=/opt/ssl --openssldir=/etc/ssl --libdir=lib no-tests no-unit-test shared \
&& make -j$(nproc) \
&& make install_sw install_ssldirs \
&& rm -rf /tmp/openssl*

ARG PYTHON_SECOND_VERSION

RUN CPPFLAGS=-I/opt/ssl/include \
LDFLAGS="-Wl,-rpath,/opt/ssl/lib" \
PYTHON_CONFIGURE_OPTS="--enable-shared --with-openssl=/opt/ssl --with-openssl-rpath=auto" \
pyenv install ${PYTHON_SECOND_VERSION} \
&& update-alternatives --install /usr/local/bin/python${PYTHON_SECOND_VERSION%.*} python${PYTHON_SECOND_VERSION%.*} /opt/pyenv/versions/${PYTHON_SECOND_VERSION}/bin/python${PYTHON_SECOND_VERSION%.*} 100

RUN printf '/usr/local/lib\n' > /etc/ld.so.conf.d/20local-lib.conf \
&& printf '/usr/local/lib64\n' >> /etc/ld.so.conf.d/20local-lib.conf \
&& mv /etc/ld.so.conf.d/libc.conf /etc/ld.so.conf.d/10libc.conf \
Expand Down
2 changes: 2 additions & 0 deletions images/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ name: 'conan-docker-tools-modern'
x-common-args: &common-args
CMAKE_VERSION: ${CMAKE_VERSION}
PYTHON_VERSION: ${PYTHON_VERSION}
PYTHON_SECOND_VERSION: ${PYTHON_SECOND_VERSION}
OPENSSL_VERSION: ${OPENSSL_VERSION}
CONAN_VERSION: ${CONAN_VERSION}
LIBSTDCPP_VERSION: ${LIBSTDCPP_VERSION}
LIBSTDCPP_PATCH_VERSION: ${LIBSTDCPP_PATCH_VERSION}
Expand Down