67 lines
1.5 KiB
Docker
67 lines
1.5 KiB
Docker
|
FROM php:7.1-apache
|
||
|
LABEL maintainer="Torben Nehmer <torben@nehmer.net>"
|
||
|
|
||
|
RUN set -ex; \
|
||
|
apt-get update; \
|
||
|
\
|
||
|
savedAptMark="$(apt-mark showmanual)"; \
|
||
|
\
|
||
|
apt-get install -y --no-install-recommends \
|
||
|
libfreetype6-dev \
|
||
|
libicu-dev \
|
||
|
libjpeg62-turbo-dev \
|
||
|
libldap2-dev \
|
||
|
libpng-dev \
|
||
|
libpq-dev \
|
||
|
libsqlite3-dev \
|
||
|
zlib1g-dev \
|
||
|
# ISPConfig requirement
|
||
|
libxml2-dev \
|
||
|
; \
|
||
|
\
|
||
|
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
||
|
docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-png-dir=/usr --with-jpeg-dir=/usr; \
|
||
|
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
|
||
|
docker-php-ext-install \
|
||
|
exif \
|
||
|
gd \
|
||
|
intl \
|
||
|
ldap \
|
||
|
pdo_mysql \
|
||
|
pdo_pgsql \
|
||
|
pdo_sqlite \
|
||
|
zip \
|
||
|
# ISPConfig requirement
|
||
|
soap \
|
||
|
; \
|
||
|
\
|
||
|
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
|
||
|
apt-mark auto '.*' > /dev/null; \
|
||
|
apt-mark manual $savedAptMark; \
|
||
|
ldd "$(php -r 'echo ini_get("extension_dir");')"/*.so \
|
||
|
| awk '/=>/ { print $3 }' \
|
||
|
| sort -u \
|
||
|
| xargs -r dpkg-query -S \
|
||
|
| cut -d: -f1 \
|
||
|
| sort -u \
|
||
|
| xargs -rt apt-mark manual; \
|
||
|
\
|
||
|
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
|
||
|
rm -rf /var/lib/apt/lists/* ;\
|
||
|
\
|
||
|
# enable mod_rewrite
|
||
|
a2enmod rewrite
|
||
|
|
||
|
# expose these volumes
|
||
|
VOLUME /var/roundcube/config
|
||
|
VOLUME /tmp/roundcube-temp
|
||
|
|
||
|
# Define Roundcubemail version
|
||
|
ENV ROUNDCUBEMAIL_VERSION 1.3.7
|
||
|
|
||
|
# Publish the rootfs file into the container
|
||
|
ADD rootfs.tar.gz /
|
||
|
|
||
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||
|
CMD ["apache2-foreground"]
|