|
|
|
@ -1,68 +1,46 @@
|
|
|
|
|
FROM php:7.4.14-apache-buster
|
|
|
|
|
LABEL maintainer="Thomas Bruederli <thomas@roundcube.net>"
|
|
|
|
|
|
|
|
|
|
FROM debian:buster-20210208-slim
|
|
|
|
|
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 \
|
|
|
|
|
libmagickwand-dev \
|
|
|
|
|
libpng-dev \
|
|
|
|
|
libpq-dev \
|
|
|
|
|
libsqlite3-dev \
|
|
|
|
|
libzip-dev \
|
|
|
|
|
php-exif \
|
|
|
|
|
php-gd \
|
|
|
|
|
php-intl \
|
|
|
|
|
php-ldap \
|
|
|
|
|
php-pdo-mysql \
|
|
|
|
|
php-pdo-pgsql \
|
|
|
|
|
php-zip \
|
|
|
|
|
php-imagick \
|
|
|
|
|
php-cli \
|
|
|
|
|
apache2 \
|
|
|
|
|
libapache2-mod-php \
|
|
|
|
|
rsync \
|
|
|
|
|
curl \
|
|
|
|
|
gnupg \
|
|
|
|
|
dirmngr \
|
|
|
|
|
locales \
|
|
|
|
|
libc-l10n \
|
|
|
|
|
ca-certificates \
|
|
|
|
|
; \
|
|
|
|
|
\
|
|
|
|
|
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
|
|
|
|
docker-php-ext-configure gd; \
|
|
|
|
|
docker-php-ext-configure ldap; \
|
|
|
|
|
docker-php-ext-install -j$(nproc) \
|
|
|
|
|
exif \
|
|
|
|
|
gd \
|
|
|
|
|
intl \
|
|
|
|
|
ldap \
|
|
|
|
|
pdo_mysql \
|
|
|
|
|
pdo_pgsql \
|
|
|
|
|
zip \
|
|
|
|
|
; \
|
|
|
|
|
pecl install imagick; \
|
|
|
|
|
docker-php-ext-enable imagick; \
|
|
|
|
|
\
|
|
|
|
|
# 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/*
|
|
|
|
|
rm -rf /var/lib/apt/lists/*; \
|
|
|
|
|
a2enmod rewrite
|
|
|
|
|
|
|
|
|
|
# installto.sh dependencies
|
|
|
|
|
# install composer
|
|
|
|
|
RUN set -ex; \
|
|
|
|
|
\
|
|
|
|
|
apt-get update; \
|
|
|
|
|
apt-get install -y --no-install-recommends \
|
|
|
|
|
rsync \
|
|
|
|
|
; \
|
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"; \
|
|
|
|
|
php -r "if (hash_file('sha384', 'composer-setup.php') === '756890a4488ce9024fc62c56153228907f1545c228516cbf63f885e036d37e9a59d27d63f46af1d4d07ee0f76181c7d3') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"; \
|
|
|
|
|
php composer-setup.php --install-dir=/usr/local/bin/ --version=2.0.9; \
|
|
|
|
|
php -r "unlink('composer-setup.php');"
|
|
|
|
|
|
|
|
|
|
# ... and composer.phar
|
|
|
|
|
ADD https://getcomposer.org/installer /tmp/composer-installer.php
|
|
|
|
|
# include the wait-for-it.sh script
|
|
|
|
|
RUN curl -fL https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > /wait-for-it.sh && chmod +x /wait-for-it.sh
|
|
|
|
|
|
|
|
|
|
RUN php /tmp/composer-installer.php --install-dir=/usr/local/bin/; \
|
|
|
|
|
rm /tmp/composer-installer.php
|
|
|
|
|
# use custom PHP settings
|
|
|
|
|
COPY php.ini /usr/local/etc/php/conf.d/roundcube-defaults.ini
|
|
|
|
|
|
|
|
|
|
RUN a2enmod rewrite
|
|
|
|
|
COPY docker-entrypoint.sh /
|
|
|
|
|
|
|
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
|
|
|
CMD ["apache2-foreground"]
|
|
|
|
|
|
|
|
|
|
# expose these volumes
|
|
|
|
|
VOLUME /var/roundcube/config
|
|
|
|
@ -76,9 +54,6 @@ ENV ROUNDCUBEMAIL_VERSION $VERSION
|
|
|
|
|
|
|
|
|
|
# Download package and extract to web volume
|
|
|
|
|
RUN set -ex; \
|
|
|
|
|
fetchDeps="gnupg dirmngr locales libc-l10n"; \
|
|
|
|
|
apt-get -qq update; \
|
|
|
|
|
apt-get install -y --no-install-recommends $fetchDeps; \
|
|
|
|
|
curl -o roundcubemail.tar.gz -fSL https://github.com/roundcube/roundcubemail/releases/download/${ROUNDCUBEMAIL_VERSION}/roundcubemail-${ROUNDCUBEMAIL_VERSION}-complete.tar.gz; \
|
|
|
|
|
curl -o roundcubemail.tar.gz.asc -fSL https://github.com/roundcube/roundcubemail/releases/download/${ROUNDCUBEMAIL_VERSION}/roundcubemail-${ROUNDCUBEMAIL_VERSION}-complete.tar.gz.asc; \
|
|
|
|
|
export GNUPGHOME="$(mktemp -d)"; \
|
|
|
|
@ -93,14 +68,3 @@ RUN set -ex; \
|
|
|
|
|
rm -r "$GNUPGHOME" roundcubemail.tar.gz.asc roundcubemail.tar.gz; \
|
|
|
|
|
rm -rf /usr/src/roundcubemail/installer; \
|
|
|
|
|
chown -R www-data:www-data /usr/src/roundcubemail/logs
|
|
|
|
|
|
|
|
|
|
# include the wait-for-it.sh script
|
|
|
|
|
RUN curl -fL https://raw.githubusercontent.com/vishnubob/wait-for-it/master/wait-for-it.sh > /wait-for-it.sh && chmod +x /wait-for-it.sh
|
|
|
|
|
|
|
|
|
|
# use custom PHP settings
|
|
|
|
|
COPY php.ini /usr/local/etc/php/conf.d/roundcube-defaults.ini
|
|
|
|
|
|
|
|
|
|
COPY docker-entrypoint.sh /
|
|
|
|
|
|
|
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
|
|
|
CMD ["apache2-foreground"]
|
|
|
|
|