#!/usr/bin/env bash # Static OpenSSL into /opt/openssl-$OPENSSL_VERSION. # # Shared by all four build images (docker/*/Dockerfile). The build context is docker/, so each # Dockerfile reaches this with COPY common/. Version inputs come from that Dockerfile's ARGs. set -eux; \ cd /tmp; \ curl -LO https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz; \ tar -xf openssl-${OPENSSL_VERSION}.tar.gz; \ cd openssl-${OPENSSL_VERSION}; \ ./Configure linux-x86_64 no-shared no-module no-tests --prefix=/opt/openssl-${OPENSSL_VERSION} --libdir=lib; \ make -j"$(nproc)"; \ make install_sw; \ cd /; rm -rf /tmp/openssl-${OPENSSL_VERSION} /tmp/openssl-${OPENSSL_VERSION}.tar.gz