From 0cacbaf067591d574ac76145c34c596312c98ce0 Mon Sep 17 00:00:00 2001 From: Gautam Korlam Date: Wed, 31 Jan 2024 13:37:01 -0800 Subject: [PATCH] Update Git, openmssh and curl to latest --- Dockerfile | 24 +++++++++++++++++++----- git_version | 2 +- includes/build.sh | 2 +- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index b5bfa5c..bcea15e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,34 +3,48 @@ FROM mlupin/docker-lambda:provided.al2-build-${BUILD_ARCH} ARG GIT_VERSION +RUN ulimit -n 1024 && yum -y update && yum -y install \ + perl-IPC-Cmd \ + && yum clean all + RUN mkdir -p /root/openssl && cd /root/openssl && \ - curl -L --output openssl.tgz https://www.openssl.org/source/openssl-1.1.1l.tar.gz && \ + curl -L --output openssl.tgz https://www.openssl.org/source/openssl-3.2.0.tar.gz && \ tar zxf openssl.tgz ARG BUILD_ARCH -RUN cd /root/openssl/openssl-1.1.1l && \ +RUN cd /root/openssl/openssl-3.2.0 && \ [[ "${BUILD_ARCH}" == "x86_64" ]] && CONF_ARCH="linux-x86_64" || CONF_ARCH="linux-aarch64" && \ ./Configure --prefix=/opt $CONF_ARCH && \ make NO_INSTALL_HARDLINKS=YesPlease -j8 && \ make NO_INSTALL_HARDLINKS=YesPlease install RUN mkdir -p /root/openssh && cd /root/openssh && \ - curl -L --output openssh.tgz https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-8.8p1.tar.gz && \ + curl -L --output openssh.tgz https://cdn.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-9.6p1.tar.gz && \ tar zxf openssh.tgz -RUN cd /root/openssh/openssh-8.8p1/ && \ +RUN cd /root/openssh/openssh-9.6p1/ && \ LD_LIBRARY_PATH=/opt/lib && \ ./configure CFLAGS="-I/opt/include" --prefix=/opt --with-ldflags="-L/opt/lib" && \ make NO_INSTALL_HARDLINKS=YesPlease -j8 && \ make NO_INSTALL_HARDLINKS=YesPlease install +RUN mkdir -p /root/curl && cd /root/curl && \ + curl -L --output curl.tgz https://curl.se/download/curl-8.5.0.tar.gz && \ + tar zxf curl.tgz + +RUN cd /root/curl/curl-8.5.0 && \ + LD_LIBRARY_PATH=/opt/lib && \ + ./configure CFLAGS="-I/opt/include" --prefix=/opt --with-ldflags="-L/opt/lib" --with-openssl=/opt && \ + make NO_INSTALL_HARDLINKS=YesPlease -j8 && \ + make NO_INSTALL_HARDLINKS=YesPlease install + RUN mkdir -p /root/git && cd /root/git && \ curl -L --output git.tgz https://www.kernel.org/pub/software/scm/git/git-${GIT_VERSION}.tar.gz && \ tar zxf git.tgz RUN cd /root/git/git-${GIT_VERSION} && \ LD_LIBRARY_PATH=/opt/lib && \ - ./configure CFLAGS="-I/opt/include" --prefix=/opt --with-ldflags="-L/opt/lib" && \ + ./configure CFLAGS="-I/opt/include" --prefix=/opt --with-ldflags="-L/opt/lib" --with-curl=/opt && \ make NO_INSTALL_HARDLINKS=YesPlease -j8 && \ make NO_INSTALL_HARDLINKS=YesPlease install diff --git a/git_version b/git_version index ba13d3c..5b9cd9a 100644 --- a/git_version +++ b/git_version @@ -1 +1 @@ -2.33.1 +2.43.0 diff --git a/includes/build.sh b/includes/build.sh index c45caa1..4efa8c4 100755 --- a/includes/build.sh +++ b/includes/build.sh @@ -16,6 +16,6 @@ GIT_VERSION="$(cat ./git_version)" step "Building ${ARCH} image for git ${GIT_VERSION}" info "Executing docker build…" -docker build -t lambda-git-build:${GIT_VERSION}-${ARCH} --build-arg BUILD_ARCH=$ARCH --build-arg GIT_VERSION=2.33.1 . >docker-build.log 2>&1 || fatal 130 "There was an error while building the Docker image. Refer to ${ROOTDIR}/docker-build.log for details." +docker build -t lambda-git-build:${GIT_VERSION}-${ARCH} --build-arg BUILD_ARCH=$ARCH --build-arg GIT_VERSION=${GIT_VERSION} . >docker-build.log 2>&1 || fatal 130 "There was an error while building the Docker image. Refer to ${ROOTDIR}/docker-build.log for details." rm docker-build.log info "Docker build finished successfully"