Skip to content

Commit 76267f4

Browse files
committed
Switch base image to -stretch variant
Fixes #21
1 parent 2ca8467 commit 76267f4

File tree

3 files changed

+40
-12
lines changed

3 files changed

+40
-12
lines changed

Dockerfile

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
FROM php:7.1-apache-jessie
1+
FROM php:7.1-apache-stretch
22

33
ADD root/ /
44
# Fix the original permissions of /tmp, the PHP default upload tmp dir.
55
RUN chmod 777 /tmp && chmod +t /tmp
6+
67
# Setup the required extensions.
8+
ARG DEBIAN_FRONTEND=noninteractive
79
RUN /tmp/setup/php-extensions.sh
810
RUN /tmp/setup/oci8-extension.sh
11+
ENV LD_LIBRARY_PATH /usr/local/instantclient
912

1013
RUN mkdir /var/www/moodledata && chown www-data /var/www/moodledata && \
1114
mkdir /var/www/phpunitdata && chown www-data /var/www/phpunitdata && \

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ A Moodle PHP environment configured for Moodle development based on [Official PH
88
|--------------|-----|--------|
99
| PHP 7.1 | 7.1 | [![Build Status](https://travis-ci.org/moodlehq/moodle-php-apache.svg?branch=php71)](https://travis-ci.org/moodlehq/moodle-php-apache)|
1010
| PHP 7.0 | 7.0 | [![Build Status](https://travis-ci.org/moodlehq/moodle-php-apache.svg?branch=php70)](https://travis-ci.org/moodlehq/moodle-php-apache)|
11-
|PHP 5.6 | 5.6 | [![Build Status](https://travis-ci.org/moodlehq/moodle-php-apache.svg?branch=php56)](https://travis-ci.org/moodlehq/moodle-php-apache)|
11+
| PHP 5.6 | 5.6 | [![Build Status](https://travis-ci.org/moodlehq/moodle-php-apache.svg?branch=php56)](https://travis-ci.org/moodlehq/moodle-php-apache)|
1212

1313
# Example usage
1414
The following command will expose the current working directory on port 8080:

root/tmp/setup/php-extensions.sh

+35-10
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,38 @@
22

33
set -e
44

5-
echo "Installing apt depdencies"
5+
echo "Installing apt dependencies"
66

7-
BUILD_PACKAGES="gettext libcurl4-openssl-dev libpq-dev libmysqlclient-dev libldap2-dev libxslt-dev \
8-
libxml2-dev libicu-dev libfreetype6-dev libjpeg62-turbo-dev libmemcached-dev \
9-
zlib1g-dev libpng12-dev unixodbc-dev"
7+
# Build packages will be added during the build, but will be removed at the end.
8+
BUILD_PACKAGES="gettext gnupg libcurl4-openssl-dev libfreetype6-dev libicu-dev libjpeg62-turbo-dev \
9+
libldap2-dev libmariadbclient-dev libmemcached-dev libpng-dev libpq-dev libxml2-dev libxslt-dev \
10+
unixodbc-dev zlib1g-dev"
1011

11-
LIBS="locales libaio1 libcurl3 libgss3 libicu52 libmysqlclient18 libpq5 libmemcached11 libmemcachedutil2 libldap-2.4-2 libxml2 libxslt1.1 unixodbc libmcrypt-dev"
12+
# Packages for Postgres.
13+
PACKAGES_POSTGRES="libpq5"
14+
15+
# Packages for MariaDB and MySQL.
16+
PACKAGES_MYMARIA="libmariadbclient18"
17+
18+
# Packages for other Moodle runtime dependenices.
19+
PACKAGES_RUNTIME="ghostscript libaio1 libcurl3 libgss3 libicu57 libmcrypt-dev libxml2 libxslt1.1 locales sassc unzip unixodbc"
20+
21+
# Packages for Memcached.
22+
PACKAGES_MEMCACHED="libmemcached11 libmemcachedutil2"
23+
24+
# Packages for LDAP.
25+
PACKAGES_LDAP="libldap-2.4-2"
1226

1327
apt-get update
14-
apt-get install -y --no-install-recommends $BUILD_PACKAGES $LIBS unzip ghostscript locales apt-transport-https
28+
apt-get install -y --no-install-recommends apt-transport-https \
29+
$BUILD_PACKAGES \
30+
$PACKAGES_POSTGRES \
31+
$PACKAGES_MYMARIA \
32+
$PACKAGES_RUNTIME \
33+
$PACKAGES_MEMCACHED \
34+
$PACKAGES_LDAP
35+
36+
# Generate the locales configuration fo rboth Australia, and the US.
1537
echo 'Generating locales..'
1638
echo 'en_US.UTF-8 UTF-8' > /etc/locale.gen
1739
echo 'en_AU.UTF-8 UTF-8' >> /etc/locale.gen
@@ -28,24 +50,27 @@ docker-php-ext-install -j$(nproc) \
2850
xmlrpc \
2951
zip
3052

53+
# GD.
3154
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
3255
docker-php-ext-install -j$(nproc) gd
3356

57+
# LDAP.
3458
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/
3559
docker-php-ext-install -j$(nproc) ldap
3660

61+
# SOLR, Memcached, Redis, APCu, igbinary.
3762
pecl install solr memcached redis apcu igbinary
3863
docker-php-ext-enable solr memcached redis apcu igbinary
3964

4065
echo 'apc.enable_cli = On' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini
4166

42-
# Install Microsoft depdencises for sqlsrv
67+
# Install Microsoft dependcies for sqlsrv.
4368
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
44-
curl https://packages.microsoft.com/config/debian/8/prod.list -o /etc/apt/sources.list.d/mssql-release.list
69+
curl https://packages.microsoft.com/config/debian/9/prod.list -o /etc/apt/sources.list.d/mssql-release.list
4570
apt-get update
46-
ACCEPT_EULA=Y apt-get install -y msodbcsql
71+
ACCEPT_EULA=Y apt-get install -y msodbcsql17
4772

48-
pecl install sqlsrv-4.3.0
73+
pecl install sqlsrv
4974
docker-php-ext-enable sqlsrv
5075

5176
# Keep our image size down..

0 commit comments

Comments
 (0)