Skip to content

Commit 015237a

Browse files
authored
Merge pull request #627 from chrishanline/v3-sqlsrv
v3: Upgrade sqlsrv extension
2 parents dc7399d + 6fbe659 commit 015237a

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

layers/sqlsrv/Dockerfile

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ ARG PHP_VERSION
55

66
ENV LD_LIBRARY_PATH=/usr/lib:/usr/lib64:$LD_LIBRARY_PATH
77

8-
RUN yum -y install unixODBC-devel-2.3.1-14.amzn2.x86_64
8+
RUN dnf -y install unixODBC-devel-2.3.9-3.amzn2023.0.3.x86_64
99

10-
RUN curl https://packages.microsoft.com/config/rhel/7/prod.repo > /etc/yum.repos.d/mssql-release.repo
11-
RUN ACCEPT_EULA=Y yum -y install msodbcsql17-17.10.1.1-1.x86_64
10+
RUN curl -fsSL https://packages.microsoft.com/config/rhel/9/prod.repo > /etc/yum.repos.d/mssql-release.repo
11+
RUN ACCEPT_EULA=Y dnf -y install msodbcsql18-18.6.1.1-1.x86_64
1212

13-
RUN if [ "$PHP_VERSION" = "80" ]; \
14-
then SQLSRV_VERSION=5.11.1 ; \
13+
RUN if [ "$PHP_VERSION" = "84" ]; \
14+
then SQLSRV_VERSION=5.13.0beta1 ; \
1515
else SQLSRV_VERSION=5.12.0 ; \
1616
fi ; \
1717
pecl install sqlsrv-${SQLSRV_VERSION} && \
@@ -30,9 +30,8 @@ RUN php /bref/lib-copy/copy-dependencies.php /tmp/pdo_sqlsrv.so /tmp/extension-l
3030
FROM scratch
3131

3232
COPY --from=ext /opt/microsoft /opt/microsoft
33+
COPY --from=ext /etc/odbcinst.ini /opt/microsoft/conf/odbcinst.ini
3334
COPY --from=ext /tmp/sqlsrv.so /opt/bref/extensions/sqlsrv.so
3435
COPY --from=ext /tmp/pdo_sqlsrv.so /opt/bref/extensions/pdo_sqlsrv.so
3536
COPY --from=ext /tmp/ext.ini /opt/bref/etc/php/conf.d/ext-sqlsrv.ini
3637
COPY --from=ext /tmp/extension-libs /opt/lib
37-
38-
COPY --from=ext /etc/odbcinst.ini /opt/microsoft/conf/odbcinst.ini

layers/sqlsrv/config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
22
"php": [
3+
"82",
4+
"83",
5+
"84"
36
]
47
}

0 commit comments

Comments
 (0)