Skip to content

Commit 7f13da3

Browse files
committed
custom pdo_sqlsrv build
1 parent efc1fe7 commit 7f13da3

File tree

4 files changed

+40
-1
lines changed

4 files changed

+40
-1
lines changed

data/8.5-alpine/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ RUN apk update \
1212

1313
# install common PHP extensions
1414
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
15+
COPY ../../fix-pdo_sqlsrv-package.xml fix-pdo_sqlsrv-package.xml
16+
RUN git clone https://github.com/microsoft/msphpsql.git -b dev pdo_sqlsrv \
17+
&& cd pdo_sqlsrv && git reset --hard b3e4bf2944 && rm -r .git \
18+
&& cp -r source/shared source/pdo_sqlsrv && cp ../fix-pdo_sqlsrv-package.xml source/pdo_sqlsrv/package.xml
1519
RUN git clone --recurse-submodules https://github.com/phpredis/phpredis.git -b develop phpredis \
1620
&& cd phpredis && git reset --hard 8be2306e4f && rm -r .git
1721
RUN git clone https://github.com/xdebug/xdebug.git -b master xdebug \

data/8.5-debian/Dockerfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ RUN (seq 1 8 | xargs -I{} mkdir -p /usr/share/man/man{}) \
1313

1414
# install common PHP extensions
1515
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
16+
COPY ../../fix-pdo_sqlsrv-package.xml fix-pdo_sqlsrv-package.xml
17+
RUN git clone https://github.com/microsoft/msphpsql.git -b dev pdo_sqlsrv \
18+
&& cd pdo_sqlsrv && git reset --hard b3e4bf2944 && rm -r .git \
19+
&& cp -r source/shared source/pdo_sqlsrv && cp ../fix-pdo_sqlsrv-package.xml source/pdo_sqlsrv/package.xml
1620
RUN git clone --recurse-submodules https://github.com/phpredis/phpredis.git -b develop phpredis \
1721
&& cd phpredis && git reset --hard 8be2306e4f && rm -r .git
1822
RUN git clone https://github.com/xdebug/xdebug.git -b master xdebug \

fix-pdo_sqlsrv-package.xml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<package version="1.0">
3+
<name>pdo_sqlsrv</name>
4+
<summary>Microsoft Drivers for PHP for SQL Server (PDO_SQLSRV)</summary>
5+
<description>x</description>
6+
<license>MIT</license>
7+
<maintainers>
8+
<maintainer>
9+
<user>davidengel</user>
10+
<name>David Engel</name>
11+
<email>davidengel@microsoft.com</email>
12+
<role>lead</role>
13+
</maintainer>
14+
</maintainers>
15+
<version>5.99.0</version>
16+
<release>
17+
<version>5.99.0</version>
18+
<date>2020-01-01</date>
19+
<state>stable</state>
20+
<notes>x</notes>
21+
<filelist>
22+
<dir name="/">
23+
<file name="*" role="src" />
24+
</dir>
25+
</filelist>
26+
</release>
27+
</package>

make.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,11 @@
100100
101101
# install common PHP extensions
102102
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
103-
' . (in_array($phpVersion, ['8.5'], true) ? 'RUN git clone --recurse-submodules https://github.com/phpredis/phpredis.git -b develop phpredis \
103+
' . (in_array($phpVersion, ['8.5'], true) ? 'COPY ../../fix-pdo_sqlsrv-package.xml fix-pdo_sqlsrv-package.xml
104+
RUN git clone https://github.com/microsoft/msphpsql.git -b dev pdo_sqlsrv \
105+
&& cd pdo_sqlsrv && git reset --hard b3e4bf2944 && rm -r .git \
106+
&& cp -r source/shared source/pdo_sqlsrv && cp ../fix-pdo_sqlsrv-package.xml source/pdo_sqlsrv/package.xml
107+
' : '') . (in_array($phpVersion, ['8.5'], true) ? 'RUN git clone --recurse-submodules https://github.com/phpredis/phpredis.git -b develop phpredis \
104108
&& cd phpredis && git reset --hard 8be2306e4f && rm -r .git
105109
' : '') . (in_array($phpVersion, ['8.5'], true) ? 'RUN git clone https://github.com/xdebug/xdebug.git -b master xdebug \
106110
&& cd xdebug && git reset --hard edf1bf7482 && rm -r .git \

0 commit comments

Comments
 (0)