Skip to content

Commit

Permalink
PHP 7.3 with pdo_sqlsrv
Browse files Browse the repository at this point in the history
  • Loading branch information
boboldehampsink committed Dec 1, 2020
1 parent aa0322d commit d7a48fc
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 6 deletions.
18 changes: 13 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ LABEL maintainer="Bob Olde Hampsink <[email protected]>"
ENV PORT 3000

# Which versions?
ENV PHP_VERSION 7.4.12
ENV PHP_VERSION 7.3.24
ENV REDIS_EXT_VERSION 5.3.2
ENV IMAGICK_EXT_VERSION 3.4.4
ENV PCOV_EXT_VERSION 1.0.6
Expand All @@ -21,7 +21,13 @@ RUN mkdir -p /app/.heroku/php /app/.heroku/node /app/.profile.d
WORKDIR /app/user

# Locate our binaries
ENV PATH /app/.heroku/php/bin:/app/.heroku/php/sbin:/app/.heroku/node/bin/:/app/user/node_modules/.bin:/app/user/vendor/bin:/app/user/:$PATH
ENV PATH /app/.heroku/php/bin:/app/.heroku/php/sbin:/app/.heroku/node/bin/:/app/user/node_modules/.bin:/app/user/vendor/bin:/app/user:/opt/mssql-tools/bin:$PATH

# Install Microsoft ODBC driver, MSSQL tools and unixODBC development headers
RUN curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - \
&& curl https://packages.microsoft.com/config/ubuntu/20.04/prod.list > /etc/apt/sources.list.d/mssql-release.list \
&& apt-get update -qqy \
&& ACCEPT_EULA=Y apt-get -qqy install msodbcsql17 mssql-tools unixodbc-dev

# Install Apache
RUN curl --silent --location https://lang-php.s3.amazonaws.com/dist-heroku-20-stable/apache-$HTTPD_VERSION.tar.gz | tar xz -C /app/.heroku/php
Expand All @@ -46,9 +52,10 @@ RUN curl --silent --location https://lang-php.s3.amazonaws.com/dist-heroku-20-st
# Config
RUN mkdir -p /app/.heroku/php/etc/php/conf.d
RUN curl --silent --location https://raw.githubusercontent.com/heroku/heroku-buildpack-php/master/support/build/_conf/php/7/0/conf.d/000-heroku.ini > /app/.heroku/php/etc/php/php.ini
RUN curl --silent --location https://lang-php.s3.amazonaws.com/dist-heroku-20-stable/extensions/no-debug-non-zts-20190902/redis-$REDIS_EXT_VERSION.tar.gz | tar xz -C /app/.heroku/php
RUN curl --silent --location https://lang-php.s3.amazonaws.com/dist-heroku-20-stable/extensions/no-debug-non-zts-20190902/imagick-$IMAGICK_EXT_VERSION.tar.gz | tar xz -C /app/.heroku/php
RUN curl --silent --location https://lang-php.s3.amazonaws.com/dist-heroku-20-stable/extensions/no-debug-non-zts-20190902/pcov-$PCOV_EXT_VERSION.tar.gz | tar xz -C /app/.heroku/php
RUN curl --silent --location https://lang-php.s3.amazonaws.com/dist-heroku-20-stable/extensions/no-debug-non-zts-20180731/redis-$REDIS_EXT_VERSION.tar.gz | tar xz -C /app/.heroku/php
RUN curl --silent --location https://lang-php.s3.amazonaws.com/dist-heroku-20-stable/extensions/no-debug-non-zts-20180731/imagick-$IMAGICK_EXT_VERSION.tar.gz | tar xz -C /app/.heroku/php
RUN curl --silent --location https://lang-php.s3.amazonaws.com/dist-heroku-20-stable/extensions/no-debug-non-zts-20180731/pcov-$PCOV_EXT_VERSION.tar.gz | tar xz -C /app/.heroku/php
RUN curl --silent --location https://github.com/robuust/heroku-php/raw/pdo_sqlsrv/packages/ext-pdo_sqlsrv-5.8.1_php-7.3.tar.gz | tar xz -C /app/.heroku/php
# Enable all optional exts
RUN echo "\n\
user_ini.cache_ttl = 30 \n\
Expand All @@ -62,6 +69,7 @@ extension=gettext.so \n\
extension=intl.so \n\
extension=mbstring.so \n\
extension=pcntl.so \n\
extension=pdo_sqlsrv.so \n\
extension=pcov.so \n\
extension=redis.so \n\
extension=imagick.so \n\
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Usage: `FROM ghcr.io/robuust/heroku-php`
* Heroku 20
* Apache
* Nginx
* PHP 7.4.x with Redis, Imagick and PCov
* PHP 7.3.x with Redis, Imagick, PCov and PDO SQL Server
* Composer 2
* Node 14.x
* Yarn
Expand Down
20 changes: 20 additions & 0 deletions packages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"packages": [
[
{
"name": "heroku-sys/ext-pdo_sqlsrv",
"version": "5.8.1",
"type": "heroku-sys-php-extension",
"require": {
"php": "7.3.*",
"heroku/installer-plugin": "^1.2.0"
},
"dist": {
"type": "heroku-sys-tar",
"url": "https://github.com/robuust/heroku-php/raw/pdo_sqlsrv/packages/ext-pdo_sqlsrv-5.8.1_php-7.3.tar.gz"
},
"time": "2020-06-16 14:10:30"
}
]
]
}
Binary file added packages/ext-pdo_sqlsrv-5.8.1_php-7.3.tar.gz
Binary file not shown.
Binary file not shown.

0 comments on commit d7a48fc

Please sign in to comment.