Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

Sqlsrv fixes #216

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docker-compose-services/sqlsrv/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ RUN curl -sSL -o /etc/apt/sources.list.d/mssql-release.list https://packages.mic

RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y -o Dpkg::Options::="--force-confold" --no-install-recommends --no-install-suggests build-essential dialog php-pear php-dev unixodbc-dev locales

RUN ACCEPT_EULA=Y DEBIAN_FRONTEND=noninteractive apt-get install -y msodbcsql18 mssql-tools
RUN ACCEPT_EULA=Y DEBIAN_FRONTEND=noninteractive apt-get install -y msodbcsql18 mssql-tools php7.4-dev

# Change the PHP version to what you want. It is currently set to version 8.0.
# Change the PHP version to what you want. It is currently set to version 7.4.
RUN pecl channel-update pecl.php.net
RUN pecl -d php_suffix=8.0 install sqlsrv
RUN pecl -d php_suffix=8.0 install pdo_sqlsrv
RUN pecl -d php_suffix=7.4 install sqlsrv
RUN pecl -d php_suffix=7.4 install pdo_sqlsrv

RUN echo 'extension=sqlsrv.so' >> "/etc/php/8.0/mods-available/sqlsrv.ini"
RUN echo 'extension=pdo_sqlsrv.so' >> "/etc/php/8.0/mods-available/pdo_sqlsrv.ini"
RUN echo 'extension=sqlsrv.so' >> "/etc/php/7.4/mods-available/sqlsrv.ini"
RUN echo 'extension=pdo_sqlsrv.so' >> "/etc/php/7.4/mods-available/pdo_sqlsrv.ini"

RUN phpenmod sqlsrv pdo_sqlsrv
2 changes: 1 addition & 1 deletion docker-compose-services/sqlsrv/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Connect to `sqlsrv` host/db server from within the web container with:
```
Host: `ddev-projectname-sqlsrv`
User: sa
Password: password!
Password: Password12!
Database: master
```

Expand Down