Commit a3ec07d7 by Patrick Steinhardt

azure: docker: pipe downloaded archives into tar(1) directly

When building dependencies for our Docker images, we first download the
sources to disk first, unpack them and finally remove the archive again.
This can be sped up by piping the downloading archive into tar(1)
directly to parallelize both tasks. Furthermore, let's silence curl(1)
to not print to status information to stderr, which tends to be
interpreted as errors by Azure Pipelines.
parent 03ac24b1
...@@ -25,9 +25,8 @@ RUN apt-get update && \ ...@@ -25,9 +25,8 @@ RUN apt-get update && \
RUN mkdir /var/run/sshd RUN mkdir /var/run/sshd
RUN cd /tmp && \ RUN cd /tmp && \
curl -LO https://tls.mbed.org/download/mbedtls-2.16.2-apache.tgz && \ curl --location --silent https://tls.mbed.org/download/mbedtls-2.16.2-apache.tgz | \
tar -xf mbedtls-2.16.2-apache.tgz && \ tar -xz && \
rm -f mbedtls-2.16.2-apache.tgz && \
cd mbedtls-2.16.2 && \ cd mbedtls-2.16.2 && \
scripts/config.pl set MBEDTLS_MD4_C 1 && \ scripts/config.pl set MBEDTLS_MD4_C 1 && \
CFLAGS=-fPIC cmake -G Ninja -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DUSE_STATIC_MBEDTLS_LIBRARY=ON . && \ CFLAGS=-fPIC cmake -G Ninja -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DUSE_STATIC_MBEDTLS_LIBRARY=ON . && \
......
...@@ -27,9 +27,8 @@ RUN apt-get update && \ ...@@ -27,9 +27,8 @@ RUN apt-get update && \
FROM apt AS mbedtls FROM apt AS mbedtls
RUN cd /tmp && \ RUN cd /tmp && \
curl -LO https://tls.mbed.org/download/mbedtls-2.16.2-apache.tgz && \ curl --location --silent https://tls.mbed.org/download/mbedtls-2.16.2-apache.tgz | \
tar -xf mbedtls-2.16.2-apache.tgz && \ tar -xz && \
rm -f mbedtls-2.16.2-apache.tgz && \
cd mbedtls-2.16.2 && \ cd mbedtls-2.16.2 && \
scripts/config.pl set MBEDTLS_MD4_C 1 && \ scripts/config.pl set MBEDTLS_MD4_C 1 && \
CFLAGS=-fPIC cmake -G Ninja -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DUSE_STATIC_MBEDTLS_LIBRARY=ON . && \ CFLAGS=-fPIC cmake -G Ninja -DENABLE_PROGRAMS=OFF -DENABLE_TESTING=OFF -DUSE_SHARED_MBEDTLS_LIBRARY=OFF -DUSE_STATIC_MBEDTLS_LIBRARY=ON . && \
...@@ -39,9 +38,8 @@ RUN cd /tmp && \ ...@@ -39,9 +38,8 @@ RUN cd /tmp && \
FROM mbedtls AS libssh2 FROM mbedtls AS libssh2
RUN cd /tmp && \ RUN cd /tmp && \
curl -LO https://www.libssh2.org/download/libssh2-1.8.2.tar.gz && \ curl --location --silent https://www.libssh2.org/download/libssh2-1.8.2.tar.gz | \
tar -xf libssh2-1.8.2.tar.gz && \ tar -xz && \
rm -f libssh2-1.8.2.tar.gz && \
cd libssh2-1.8.2 && \ cd libssh2-1.8.2 && \
CFLAGS=-fPIC cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCRYPTO_BACKEND=Libgcrypt . && \ CFLAGS=-fPIC cmake -G Ninja -DBUILD_SHARED_LIBS=ON -DCRYPTO_BACKEND=Libgcrypt . && \
ninja install && \ ninja install && \
...@@ -50,9 +48,8 @@ RUN cd /tmp && \ ...@@ -50,9 +48,8 @@ RUN cd /tmp && \
FROM libssh2 AS valgrind FROM libssh2 AS valgrind
RUN cd /tmp && \ RUN cd /tmp && \
curl -LO https://sourceware.org/pub/valgrind/valgrind-3.15.0.tar.bz2 && \ curl --location --silent https://sourceware.org/pub/valgrind/valgrind-3.15.0.tar.bz2 | \
tar -xf valgrind-3.15.0.tar.bz2 && \ tar -xj && \
rm -f valgrind-3.15.0.tar.bz2 && \
cd valgrind-3.15.0 && \ cd valgrind-3.15.0 && \
./configure && \ ./configure && \
make && \ make && \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment