Comments (2)
@joelataylor I just had to do that and it seems to be quite the hassle.
This is an excerpt from my Dockerfile:
RUN sh -c "curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -" \
&& apt-get update \
&& sh -c "curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list > /etc/apt/sources.list.d/mssql-release.list" \
&& apt-get update \
&& ACCEPT_EULA=Y apt-get install -y \
msodbcsql18 \
mssql-tools18 \
unixodbc-dev \
php-pear \
php-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
RUN pecl config-set php_ini /etc/php/8.3/fpm/php.ini
RUN pecl install sqlsrv
RUN pecl install pdo_sqlsrv
RUN printf "; priority=20\nextension=sqlsrv.so\n" > /etc/php/8.3/mods-available/sqlsrv.ini
RUN printf "; priority=30\nextension=pdo_sqlsrv.so\n" > /etc/php/8.3/mods-available/pdo_sqlsrv.ini
RUN phpenmod -v 8.3 sqlsrv pdo_sqlsrv
First your installing the ODBC drivers from microsoft then your are installing php-pear so you can use pecl. This is done for php-fpm so you might need to adjust it to your needs.
This will probably get the job done but i would rather avoid installing php-pear in the future.
So an easier way would be much appreciated.
from docker-images-php.
Related Issues (20)
- Support the creators
- Takes too long to shut down HOT 1
- New v5 and new roadmap HOT 7
- Add environment variable to change Apache ports HOT 1
- Add decimal extension
- Cannot run Composer binaries without path anymore HOT 10
- Add uopz extension HOT 2
- Add libvips HOT 2
- Lots of `<defunct>` processes when using Cron HOT 2
- No rebuild with Composer 2.6.2? HOT 3
- Publishing image on other container registries HOT 4
- Docker fails when using non-privileged user HOT 2
- Add PHP 8.3 images HOT 15
- Extra extentions loading not working for BitBucket pipeline HOT 4
- Building image from php:8.2-v4-apache or php:8.3-v4-apache fails with modified php.ini query HOT 3
- Redis missing from fat image HOT 5
- Missing "gd" PHP extension HOT 3
- Composer 2.7 and CVE-2024-24821 HOT 1
- Extension opentelemetry HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker-images-php.