From fa9d22f83e22e8cbc1d0a7932238a302c1742194 Mon Sep 17 00:00:00 2001 From: chrishanline Date: Tue, 3 Feb 2026 12:52:18 -0600 Subject: [PATCH 1/5] use sqlsrv 5.13.0beta1 for php 8.4 --- layers/sqlsrv/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/layers/sqlsrv/Dockerfile b/layers/sqlsrv/Dockerfile index 390d118f..2973aa8e 100644 --- a/layers/sqlsrv/Dockerfile +++ b/layers/sqlsrv/Dockerfile @@ -8,10 +8,13 @@ ENV LD_LIBRARY_PATH=/usr/lib:/usr/lib64:$LD_LIBRARY_PATH RUN yum -y install unixODBC-devel-2.3.1-14.amzn2.x86_64 RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo -RUN ACCEPT_EULA=Y yum -y install msodbcsql17-17.10.1.1-1.x86_64 +# RUN ACCEPT_EULA=Y yum -y install msodbcsql17-17.10.1.1-1.x86_64 +RUN ACCEPT_EULA=Y yum -y install msodbcsql17-17.10.6.1-1.x86_64 RUN if [ "$PHP_VERSION" = "80" ]; \ then SQLSRV_VERSION=5.11.1 ; \ + elif [ "$PHP_VERSION" = "84" ]; \ + then SQLSRV_VERSION=5.13.0beta1 ; \ else SQLSRV_VERSION=5.12.0 ; \ fi ; \ pecl install sqlsrv-${SQLSRV_VERSION} && \ From 00b7d5e4bd39b717fcf7662a2a096ec6c1b32dc0 Mon Sep 17 00:00:00 2001 From: chrishanline Date: Tue, 3 Feb 2026 20:13:28 -0600 Subject: [PATCH 2/5] upgrade to msodbcsql17-17.10.6.1-1 --- layers/sqlsrv/Dockerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/layers/sqlsrv/Dockerfile b/layers/sqlsrv/Dockerfile index 2973aa8e..410bf51b 100644 --- a/layers/sqlsrv/Dockerfile +++ b/layers/sqlsrv/Dockerfile @@ -8,7 +8,6 @@ ENV LD_LIBRARY_PATH=/usr/lib:/usr/lib64:$LD_LIBRARY_PATH RUN yum -y install unixODBC-devel-2.3.1-14.amzn2.x86_64 RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo -# RUN ACCEPT_EULA=Y yum -y install msodbcsql17-17.10.1.1-1.x86_64 RUN ACCEPT_EULA=Y yum -y install msodbcsql17-17.10.6.1-1.x86_64 RUN if [ "$PHP_VERSION" = "80" ]; \ From aea6ce42314b269b703b8bf1817330de321c6853 Mon Sep 17 00:00:00 2001 From: chrishanline Date: Fri, 27 Feb 2026 07:38:39 -0600 Subject: [PATCH 3/5] workaround to build with openssl-snapsafe-libs conflict --- layers/sqlsrv/Dockerfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/layers/sqlsrv/Dockerfile b/layers/sqlsrv/Dockerfile index 410bf51b..26b9d509 100644 --- a/layers/sqlsrv/Dockerfile +++ b/layers/sqlsrv/Dockerfile @@ -5,6 +5,21 @@ ARG PHP_VERSION ENV LD_LIBRARY_PATH=/usr/lib:/usr/lib64:$LD_LIBRARY_PATH +# Workaround for openssl-snapsafe-libs conflict in AL2 Lambda base images. +# See: https://github.com/aws/aws-lambda-base-images/issues/245#issuecomment-2714953498 +RUN cat > /etc/yum.repos.d/amzn2-extras-snapsafe.repo << 'EOF' +[amzn2extra-openssl-snapsafe] +name=Amazon Extras repo for openssl-snapsafe +enabled=1 +mirrorlist=$awsproto://$amazonlinux.$awsregion.$awsdomain/2/extras/openssl-snapsafe/latest/$basearch/mirror.list +gpgcheck=1 +gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-linux-2 +priority=10 +skip_if_unavailable=1 +report_instanceid=yes +EOF +RUN yum upgrade -y openssl-snapsafe-libs + RUN yum -y install unixODBC-devel-2.3.1-14.amzn2.x86_64 RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo From 1141d7870e55411a7b24f9a4688735003d15e19d Mon Sep 17 00:00:00 2001 From: chrishanline Date: Fri, 27 Feb 2026 07:47:11 -0600 Subject: [PATCH 4/5] use printf instead of heredoc --- layers/sqlsrv/Dockerfile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/layers/sqlsrv/Dockerfile b/layers/sqlsrv/Dockerfile index 26b9d509..a942238c 100644 --- a/layers/sqlsrv/Dockerfile +++ b/layers/sqlsrv/Dockerfile @@ -7,17 +7,17 @@ ENV LD_LIBRARY_PATH=/usr/lib:/usr/lib64:$LD_LIBRARY_PATH # Workaround for openssl-snapsafe-libs conflict in AL2 Lambda base images. # See: https://github.com/aws/aws-lambda-base-images/issues/245#issuecomment-2714953498 -RUN cat > /etc/yum.repos.d/amzn2-extras-snapsafe.repo << 'EOF' -[amzn2extra-openssl-snapsafe] -name=Amazon Extras repo for openssl-snapsafe -enabled=1 -mirrorlist=$awsproto://$amazonlinux.$awsregion.$awsdomain/2/extras/openssl-snapsafe/latest/$basearch/mirror.list -gpgcheck=1 -gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-linux-2 -priority=10 -skip_if_unavailable=1 -report_instanceid=yes -EOF +RUN printf '%s\n' \ + '[amzn2extra-openssl-snapsafe]' \ + 'name=Amazon Extras repo for openssl-snapsafe' \ + 'enabled=1' \ + 'mirrorlist=$awsproto://$amazonlinux.$awsregion.$awsdomain/2/extras/openssl-snapsafe/latest/$basearch/mirror.list' \ + 'gpgcheck=1' \ + 'gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-amazon-linux-2' \ + 'priority=10' \ + 'skip_if_unavailable=1' \ + 'report_instanceid=yes' \ + > /etc/yum.repos.d/amzn2-extras-snapsafe.repo RUN yum upgrade -y openssl-snapsafe-libs RUN yum -y install unixODBC-devel-2.3.1-14.amzn2.x86_64 From 2d26e74a706d485b9af1fbeb236ce16f8b8fc2cb Mon Sep 17 00:00:00 2001 From: chrishanline Date: Fri, 27 Feb 2026 12:41:01 -0600 Subject: [PATCH 5/5] php 83 and 84 use 5.13.0 --- layers/sqlsrv/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/layers/sqlsrv/Dockerfile b/layers/sqlsrv/Dockerfile index a942238c..148c1df1 100644 --- a/layers/sqlsrv/Dockerfile +++ b/layers/sqlsrv/Dockerfile @@ -27,9 +27,9 @@ RUN ACCEPT_EULA=Y yum -y install msodbcsql17-17.10.6.1-1.x86_64 RUN if [ "$PHP_VERSION" = "80" ]; \ then SQLSRV_VERSION=5.11.1 ; \ - elif [ "$PHP_VERSION" = "84" ]; \ - then SQLSRV_VERSION=5.13.0beta1 ; \ - else SQLSRV_VERSION=5.12.0 ; \ + elif [ "$PHP_VERSION" = "81" ] || [ "$PHP_VERSION" = "82" ]; \ + then SQLSRV_VERSION=5.12.0 ; \ + else SQLSRV_VERSION=5.13.0 ; \ fi ; \ pecl install sqlsrv-${SQLSRV_VERSION} && \ pecl install pdo_sqlsrv-${SQLSRV_VERSION}