更新openssl至3.3.0版本

This commit is contained in:
huty 2024-04-30 09:38:00 +00:00 committed by cloud-init created default user
parent 2af372770f
commit 9ce5290d49
5 changed files with 11 additions and 9 deletions

View File

@ -10,7 +10,9 @@ ARG GROUP_ID=1024 \
USER_ID=1024 \
USER_NAME=openssl \
USER_HOME=/home/openssl \
USER_SHELL=/bin/bash
USER_SHELL=/bin/bash \
INSTALL_PATH=/opt/openssl \
OPENSSL_VERSION=3.3.0
# 更新应用并安装基础应用
RUN set -ex && \
@ -24,18 +26,18 @@ RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
chown -R $GROUP_NAME.$USER_NAME $USER_HOME
# 安装 OpenSSL
ADD openssl-3.2.1.zip $USER_HOME/openssl-3.2.1.zip
ADD openssl-$OPENSSL_VERSION.zip $USER_HOME/openssl-$OPENSSL_VERSION.zip
RUN apk add --no-cache unzip perl && \
cd $USER_HOME && \
unzip openssl-3.2.1.zip && \
rm -rf openssl-3.2.1.zip && \
unzip openssl-$OPENSSL_VERSION.zip && \
rm -rf openssl-$OPENSSL_VERSION.zip && \
apk del unzip && \
chown -R $GROUP_NAME.$USER_NAME $USER_HOME && \
mv /usr/lib/libssl.so.3 /usr/lib/libssl.so.3.bak && \
mv /usr/lib/libcrypto.so.3 /usr/lib/libcrypto.so.3.bak && \
ln -s $USER_HOME/openssl-3.2.1/lib64/libssl.so.3 /usr/lib/libssl.so.3 && \
ln -s $USER_HOME/openssl-3.2.1/lib64/libcrypto.so.3 /usr/lib/libcrypto.so.3 && \
ln -s $USER_HOME/openssl-3.2.1/bin/openssl /usr/bin/openssl
ln -s $USER_HOME/openssl-$OPENSSL_VERSION/lib64/libssl.so.3 /usr/lib/libssl.so.3 && \
ln -s $USER_HOME/openssl-$OPENSSL_VERSION/lib64/libcrypto.so.3 /usr/lib/libcrypto.so.3 && \
ln -s $USER_HOME/openssl-$OPENSSL_VERSION/bin/openssl /usr/bin/openssl
# 设置工作目录
WORKDIR $USER_HOME

View File

@ -12,7 +12,7 @@ ARG GROUP_ID=1024 \
USER_HOME=/home/openssl \
USER_SHELL=/bin/bash \
INSTALL_PATH=/opt/openssl \
OPENSSL_VERSION=3.2.1
OPENSSL_VERSION=3.3.0
# 更新应用并安装基础应用、清除 zypper 缓存
RUN set -ex && \
@ -28,7 +28,7 @@ RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
chown -R $GROUP_NAME.$USER_NAME $USER_HOME $INSTALL_PATH
# 安装 OpenSSL
ADD openssl-$OPENSSL_VERSION-src.tar.gz $USER_HOME
ADD openssl-$OPENSSL_VERSION.tar.gz $USER_HOME
RUN zypper install -y perl gcc make && \
cd $USER_HOME && \
chown -R $GROUP_NAME.$USER_NAME $USER_HOME && \

Binary file not shown.