Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 2 additions & 0 deletions .ci/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ 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["name"] = getModernImageName(imageData, registry)
// pull images from registry to be used as cache
String masterImageName = getImageMasterName(imageData)
Expand All @@ -108,6 +109,7 @@ 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"]['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
1 change: 1 addition & 0 deletions images/.env
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ 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
LIBSTDCPP_VERSION=10.3.0
LIBSTDCPP_PATCH_VERSION=28
LIBSTDCPP_MAJOR_VERSION=10
Expand Down
22 changes: 20 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,23 @@ 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
RUN wget --no-check-certificate --quiet -O /tmp/openssl-1.1.1w.tar.gz https://github.com/openssl/openssl/releases/download/OpenSSL_1_1_1w/openssl-1.1.1w.tar.gz \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it work with a recent OpenSSL 3.x? as 1.x is already EOL

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question! Let me try with OpenSSL 3.x. Thank you for reviewing!

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can build locally using OpenSSL 3.5.0 (latest). Addressed the changes on the commit 07ed7e8

&& tar -xzf /tmp/openssl-1.1.1w.tar.gz -C /tmp \
&& cd /tmp/openssl-1.1.1w \
&& ./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-1.1.1w*

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
1 change: 1 addition & 0 deletions images/compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: 'conan-docker-tools-modern'
x-common-args: &common-args
CMAKE_VERSION: ${CMAKE_VERSION}
PYTHON_VERSION: ${PYTHON_VERSION}
PYTHON_SECOND_VERSION: ${PYTHON_SECOND_VERSION}
CONAN_VERSION: ${CONAN_VERSION}
LIBSTDCPP_VERSION: ${LIBSTDCPP_VERSION}
LIBSTDCPP_PATCH_VERSION: ${LIBSTDCPP_PATCH_VERSION}
Expand Down