2
2
3
3
set -e
4
4
5
- echo " Installing apt depdencies "
5
+ echo " Installing apt dependencies "
6
6
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"
10
11
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"
12
26
13
27
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.
15
37
echo ' Generating locales..'
16
38
echo ' en_US.UTF-8 UTF-8' > /etc/locale.gen
17
39
echo ' en_AU.UTF-8 UTF-8' >> /etc/locale.gen
@@ -28,24 +50,27 @@ docker-php-ext-install -j$(nproc) \
28
50
xmlrpc \
29
51
zip
30
52
53
+ # GD.
31
54
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/
32
55
docker-php-ext-install -j$( nproc) gd
33
56
57
+ # LDAP.
34
58
docker-php-ext-configure ldap --with-libdir=lib/x86_64-linux-gnu/
35
59
docker-php-ext-install -j$( nproc) ldap
36
60
61
+ # SOLR, Memcached, Redis, APCu, igbinary.
37
62
pecl install solr memcached redis apcu igbinary
38
63
docker-php-ext-enable solr memcached redis apcu igbinary
39
64
40
65
echo ' apc.enable_cli = On' >> /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini
41
66
42
- # Install Microsoft depdencises for sqlsrv
67
+ # Install Microsoft dependcies for sqlsrv.
43
68
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
45
70
apt-get update
46
- ACCEPT_EULA=Y apt-get install -y msodbcsql
71
+ ACCEPT_EULA=Y apt-get install -y msodbcsql17
47
72
48
- pecl install sqlsrv-4.3.0
73
+ pecl install sqlsrv
49
74
docker-php-ext-enable sqlsrv
50
75
51
76
# Keep our image size down..
0 commit comments