docker: install mbedTLS on both Bionic and Xenial We're about to phase out support for Trusty, but neither Bionic nor Xenial images provide the mbedTLS library that's available in Trusty. Build them for both to pull them in line with Trusty.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
diff --git a/azure-pipelines/docker/bionic b/azure-pipelines/docker/bionic
index 7cd906b..868d731 100644
--- a/azure-pipelines/docker/bionic
+++ b/azure-pipelines/docker/bionic
@@ -5,3 +5,15 @@ RUN apt-get update
RUN apt-get -y install pkgconf clang git cmake curl libssl-dev libcurl4 libcurl4-openssl-dev libssh2-1-dev libz-dev valgrind openssh-client openssh-server
RUN if [ "$ARCH" != "armhf" -a "$ARCH" != "arm64" ]; then apt-get -y install openjdk-11-jre-headless; fi
RUN mkdir /var/run/sshd
+
+RUN cd /tmp && \
+ curl -LO https://tls.mbed.org/download/mbedtls-2.16.2-apache.tgz && \
+ tar -xf mbedtls-2.16.2-apache.tgz && \
+ rm -f mbedtls-2.16.2-apache.tgz && \
+ cd mbedtls-2.16.2 && \
+ scripts/config.pl set MBEDTLS_MD4_C 1 && \
+ CFLAGS=-fPIC cmake -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DUSE_STATIC_MBEDTLS_LIBRARY=ON . && \
+ cmake --build . && \
+ make install && \
+ cd .. && \
+ rm -rf mbedtls-2.16.2
diff --git a/azure-pipelines/docker/xenial b/azure-pipelines/docker/xenial
index f82f272..f50854b 100644
--- a/azure-pipelines/docker/xenial
+++ b/azure-pipelines/docker/xenial
@@ -4,3 +4,15 @@ ARG CACHEBUST=1
RUN apt-get update
RUN apt-get -y install pkgconf clang git cmake curl libssl-dev libcurl3 libcurl3-gnutls libcurl4-gnutls-dev valgrind openssh-client openssh-server openjdk-8-jre
RUN mkdir /var/run/sshd
+
+RUN cd /tmp && \
+ curl -LO https://tls.mbed.org/download/mbedtls-2.16.2-apache.tgz && \
+ tar -xf mbedtls-2.16.2-apache.tgz && \
+ rm -f mbedtls-2.16.2-apache.tgz && \
+ cd mbedtls-2.16.2 && \
+ scripts/config.pl set MBEDTLS_MD4_C 1 && \
+ CFLAGS=-fPIC cmake -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DUSE_STATIC_MBEDTLS_LIBRARY=ON . && \
+ cmake --build . && \
+ make install && \
+ cd .. && \
+ rm -rf mbedtls-2.16.2