diff --git a/5.6/Dockerfile b/5.6/Dockerfile index 55d79f5..e94c1d6 100644 --- a/5.6/Dockerfile +++ b/5.6/Dockerfile @@ -31,9 +31,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \ soap \ xsl \ zip \ - sockets \ - pdo_sqlsrv \ - sqlsrv + sockets # already installed: # iconv \ # mbstring \ diff --git a/5.6/apache/Dockerfile b/5.6/apache/Dockerfile index eb77cb1..34ea961 100644 --- a/5.6/apache/Dockerfile +++ b/5.6/apache/Dockerfile @@ -32,8 +32,6 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \ xsl \ zip \ sockets \ - pdo_sqlsrv \ - sqlsrv \ # already installed: # iconv \ # mbstring \ diff --git a/5.6/fpm/Dockerfile b/5.6/fpm/Dockerfile index 4316ad2..c0b7773 100644 --- a/5.6/fpm/Dockerfile +++ b/5.6/fpm/Dockerfile @@ -31,9 +31,7 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get update -q \ soap \ xsl \ zip \ - sockets \ - pdo_sqlsrv \ - sqlsrv + sockets # already installed: # iconv \ # mbstring \ diff --git a/Makefile b/Makefile index 3378dfa..4142187 100644 --- a/Makefile +++ b/Makefile @@ -28,9 +28,7 @@ EXTENSIONS := \ soap \ xsl \ zip \ - sockets \ - pdo_sqlsrv \ - sqlsrv + sockets ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 latest)) # Add more extensions to PHP < 7.2. EXTENSIONS += mcrypt @@ -38,6 +36,9 @@ endif ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 latest)) # Add more extensions to 5.x series images. EXTENSIONS += mysql +else + EXTENSIONS += pdo_sqlsrv \ + sqlsrv endif build: diff --git a/README.md b/README.md index 4f33df1..69025f8 100644 --- a/README.md +++ b/README.md @@ -72,7 +72,7 @@ in addition to those you can already find in the [official PHP image](https://hu - `mysqli` - `pdo_mysql` - `pdo_pgsql` -- `pdo_sqlsrv` +- `pdo_sqlsrv` (_only PHP ≥ 7.0_) - `pgsql` - `redis` - `soap` @@ -80,7 +80,7 @@ in addition to those you can already find in the [official PHP image](https://hu - `Zend OPcache` - `zip` - `sockets` -- `sqlsrv` +- `sqlsrv` (_only PHP ≥ 7.0_) You will probably not need all this stuff. Even if having some extra extensions loaded ain't a big issue in most cases, you will very likely want to checkout this repository, remove unwanted extensions from the `Dockerfile`, and build your own image — for sometimes removing is easier than adding. 😉 diff --git a/dev/Makefile b/dev/Makefile index 3def982..d58e039 100644 --- a/dev/Makefile +++ b/dev/Makefile @@ -29,9 +29,7 @@ EXTENSIONS := \ Xdebug \ xsl \ zip \ - sockets \ - pdo_sqlsrv \ - sqlsrv + sockets ifeq (,$(findstring $(PHP_VERSION), 7.2 7.3 7.4 latest)) # Add more extensions to PHP < 7.2. EXTENSIONS += mcrypt @@ -39,6 +37,9 @@ endif ifeq (,$(findstring $(PHP_VERSION), 7.0 7.1 7.2 7.3 7.4 latest)) # Add more extensions to 5.x series images. EXTENSIONS += mysql +else + EXTENSIONS += pdo_sqlsrv \ + sqlsrv endif build: