2021-02-10 08:02:28 +00:00
|
|
|
FROM debian:buster-20210208-slim
|
2021-02-03 11:14:09 +00:00
|
|
|
RUN set -ex; \
|
|
|
|
apt-get update; \
|
|
|
|
apt-get install -y --no-install-recommends \
|
2021-02-10 08:02:28 +00:00
|
|
|
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 \
|
2021-02-03 11:14:09 +00:00
|
|
|
; \
|
2021-02-10 08:02:28 +00:00
|
|
|
rm -rf /var/lib/apt/lists/*; \
|
2021-02-10 09:48:56 +00:00
|
|
|
a2enmod rewrite; \
|
|
|
|
curl -fLSko /etc/ssl/certs/cacert.pem https://curl.se/ca/cacert.pem
|
|
|
|
|
|
|
|
ENV CURL_CA_BUNDLE=/etc/ssl/certs/cacert.pem
|
2021-02-03 11:14:09 +00:00
|
|
|
|
2021-02-10 08:02:28 +00:00
|
|
|
# install composer
|
2021-02-03 11:14:09 +00:00
|
|
|
RUN set -ex; \
|
2021-02-10 08:02:28 +00:00
|
|
|
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');"
|
|
|
|
|
|
|
|
# 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
|
2021-02-03 11:14:09 +00:00
|
|
|
|
2021-02-10 08:02:28 +00:00
|
|
|
# use custom PHP settings
|
|
|
|
COPY php.ini /usr/local/etc/php/conf.d/roundcube-defaults.ini
|
2021-02-03 11:14:09 +00:00
|
|
|
|
2021-02-10 08:02:28 +00:00
|
|
|
COPY docker-entrypoint.sh /
|
2021-02-03 11:14:09 +00:00
|
|
|
|
2021-02-10 08:02:28 +00:00
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
|
|
CMD ["apache2-foreground"]
|
2021-02-03 11:14:09 +00:00
|
|
|
|
|
|
|
# expose these volumes
|
|
|
|
VOLUME /var/roundcube/config
|
|
|
|
VOLUME /var/roundcube/db
|
|
|
|
VOLUME /var/www/html
|
|
|
|
VOLUME /tmp/roundcube-temp
|
|
|
|
|
|
|
|
# Define Roundcubemail version
|
|
|
|
ARG VERSION
|
|
|
|
ENV ROUNDCUBEMAIL_VERSION $VERSION
|
|
|
|
|
|
|
|
# Download package and extract to web volume
|
|
|
|
RUN set -ex; \
|
|
|
|
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)"; \
|
|
|
|
# workaround for "Cannot assign requested address", see e.g. https://github.com/inversepath/usbarmory-debian-base_image/issues/9
|
|
|
|
echo "disable-ipv6" > "$GNUPGHOME/dirmngr.conf"; \
|
|
|
|
# ha.pool.sks-keyservers.net seems to be unreliable, use pgp.mit.edu as fallback
|
|
|
|
gpg --batch --keyserver ha.pool.sks-keyservers.net --recv-keys F3E4C04BB3DB5D4215C45F7F5AB2BAA141C4F7D5 || gpg --batch --keyserver pgp.mit.edu --recv-keys F3E4C04BB3DB5D4215C45F7F5AB2BAA141C4F7D5; \
|
|
|
|
gpg --batch --verify roundcubemail.tar.gz.asc roundcubemail.tar.gz; \
|
|
|
|
gpgconf --kill all; \
|
|
|
|
mkdir /usr/src/roundcubemail; \
|
|
|
|
tar -xf roundcubemail.tar.gz -C /usr/src/roundcubemail --strip-components=1 --no-same-owner; \
|
|
|
|
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
|