Files
docker-nginx-full/scripts/install-openssl
T
Jamie Curnow 8da6844b91 Install and build openssl
Updated golang to 1.19.7
2023-03-11 15:37:45 +10:00

36 lines
842 B
Bash
Executable File
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash -e
BLUE='\E[1;34m'
CYAN='\E[1;36m'
YELLOW='\E[1;33m'
GREEN='\E[1;32m'
RESET='\E[0m'
echo -e "${BLUE} ${CYAN}Building and installing openssl ${YELLOW}${OPENSSL_VERSION}...${RESET}"
# remove previously installed openssl
if test -f "/usr/bin/openssl"; then
apt-get update
apt-get remove -y opensssl || true
apt-get clean
rm -rf /var/lib/apt/lists/* /var/cache/*
fi
cd /tmp
wget "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz"
tar -xzf "openssl-${OPENSSL_VERSION}.tar.gz"
mv "/tmp/openssl-${OPENSSL_VERSION}" /tmp/openssl
cd /tmp/openssl
./config
make test
make install
rm -rf /usr/bin/openssl
ln -s /usr/local/bin/openssl /usr/bin/openssl
ldconfig
cd /tmp
rm -rf /tmp/openssl /usr/local/share/docker/openssl
echo -e "${BLUE} ${GREEN}openssl install completed: ${YELLOW}$(openssl version)${RESET}"