2022-07-14 14:00:06 +02:00
|
|
|
FROM php:8.0-apache
|
2019-08-23 21:24:21 +02:00
|
|
|
|
2021-11-17 22:00:04 +02:00
|
|
|
ARG VERSION
|
2021-11-04 15:22:12 +02:00
|
|
|
ENV TZ Etc/UTC
|
|
|
|
|
2021-11-17 22:00:04 +02:00
|
|
|
LABEL version=$VERSION
|
|
|
|
|
2021-11-03 16:18:00 +02:00
|
|
|
RUN set -eu \
|
2022-05-30 19:18:35 +02:00
|
|
|
&& apt-get update \
|
2021-11-03 16:18:00 +02:00
|
|
|
&& echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections \
|
2022-05-30 18:38:32 +02:00
|
|
|
&& apt-get install -y --no-install-recommends \
|
2021-11-03 16:18:00 +02:00
|
|
|
python3 curl python3-pip git python3-multidict \
|
2022-01-01 12:51:11 +02:00
|
|
|
python3-jinja2 gpg gpg-agent tzdata \
|
2021-11-03 16:18:00 +02:00
|
|
|
&& pip3 install socrate \
|
|
|
|
&& echo date.timezone=UTC > /usr/local/etc/php/conf.d/timezone.ini \
|
|
|
|
&& echo "ServerSignature Off\nServerName roundcube" >> /etc/apache2/apache2.conf \
|
2022-06-15 14:30:26 +02:00
|
|
|
&& sed -i '/CustomLog.*combined$/d' /etc/apache2/sites-available/000-default.conf \
|
2021-11-03 16:18:00 +02:00
|
|
|
\
|
|
|
|
&& mark="$(apt-mark showmanual)" \
|
2022-05-30 18:38:32 +02:00
|
|
|
&& apt-get install -y --no-install-recommends \
|
2021-11-03 16:18:00 +02:00
|
|
|
libfreetype6-dev libicu-dev libjpeg62-turbo-dev libldap2-dev libmagickwand-dev \
|
|
|
|
libpng-dev libpq-dev libsqlite3-dev libzip-dev libpspell-dev libonig-dev \
|
|
|
|
&& ln -s php.ini-production /usr/local/etc/php/php.ini \
|
|
|
|
&& docker-php-ext-configure gd --with-jpeg --with-freetype \
|
|
|
|
&& docker-php-ext-install exif gd intl zip pspell pdo_mysql pdo_pgsql pdo_sqlite \
|
|
|
|
&& pecl install imagick \
|
|
|
|
&& docker-php-ext-enable imagick opcache \
|
|
|
|
&& apt-mark auto '.*' >/dev/null \
|
|
|
|
&& apt-mark manual ${mark} >/dev/null \
|
|
|
|
&& 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 -r apt-mark manual >/dev/null \
|
|
|
|
&& apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false \
|
|
|
|
&& rm -rf /var/lib/apt/lists
|
2019-07-25 10:33:57 +02:00
|
|
|
|
2022-08-14 23:01:56 +02:00
|
|
|
ENV ROUNDCUBE_URL https://github.com/roundcube/roundcubemail/releases/download/1.5.3/roundcubemail-1.5.3-complete.tar.gz
|
|
|
|
ENV CARDDAV_URL https://github.com/mstilkerich/rcmcarddav/releases/download/v4.4.2/carddav-v4.4.2.tar.gz
|
2019-12-26 21:29:45 +02:00
|
|
|
|
2021-11-03 16:18:00 +02:00
|
|
|
RUN set -eu \
|
2018-10-11 03:18:35 +02:00
|
|
|
&& rm -rf /var/www/html/ \
|
2017-09-17 19:19:28 +02:00
|
|
|
&& cd /var/www \
|
2021-06-30 12:36:11 +02:00
|
|
|
&& curl -sL ${ROUNDCUBE_URL} | tar xz \
|
|
|
|
&& curl -sL ${CARDDAV_URL} | tar xz \
|
2017-09-17 19:19:28 +02:00
|
|
|
&& mv roundcubemail-* html \
|
2019-12-26 21:29:45 +02:00
|
|
|
&& mv carddav html/plugins/ \
|
2017-09-17 19:19:28 +02:00
|
|
|
&& cd html \
|
2021-11-03 16:18:00 +02:00
|
|
|
&& rm -rf CHANGELOG.md SECURITY.md INSTALL LICENSE README.md UPGRADING composer.json-dist installer composer.* \
|
2021-09-24 18:15:00 +02:00
|
|
|
&& ln -sf index.php /var/www/html/sso.php \
|
2021-09-28 11:16:40 +02:00
|
|
|
&& ln -sf /dev/stderr /var/www/html/logs/errors.log \
|
2021-09-24 18:15:00 +02:00
|
|
|
&& chown -R root:root . \
|
2021-09-28 11:16:40 +02:00
|
|
|
&& chown www-data:www-data logs temp \
|
2021-09-24 18:15:00 +02:00
|
|
|
&& chmod -R a+rX . \
|
2021-11-03 20:32:31 +02:00
|
|
|
&& a2enmod rewrite deflate expires headers \
|
2021-12-18 18:43:21 +02:00
|
|
|
&& echo date.timezone=${TZ} > /usr/local/etc/php/conf.d/timezone.ini \
|
|
|
|
&& rm -rf plugins/{autologon,example_addressbook,http_authentication,krb_authentication,new_user_identity,password,redundant_attachments,squirrelmail_usercopy,userinfo,virtuser_file,virtuser_query}
|
|
|
|
|
|
|
|
# enable database_attachments (and memcache?)
|
2016-02-24 08:44:49 +02:00
|
|
|
|
2021-02-06 19:14:58 +02:00
|
|
|
COPY mailu.php /var/www/html/plugins/mailu/mailu.php
|
2021-12-17 16:54:05 +02:00
|
|
|
COPY php.ini /
|
|
|
|
COPY config.inc.php /
|
|
|
|
COPY start.py /
|
2022-01-28 23:03:18 +02:00
|
|
|
COPY config.inc.carddav.php /var/www/html/plugins/carddav/config.inc.php
|
2016-02-24 08:44:49 +02:00
|
|
|
|
2018-09-28 17:12:50 +02:00
|
|
|
EXPOSE 80/tcp
|
2021-12-18 18:43:21 +02:00
|
|
|
VOLUME /data
|
|
|
|
VOLUME /overrides
|
2018-09-28 17:12:50 +02:00
|
|
|
|
2018-10-23 10:58:36 +02:00
|
|
|
CMD /start.py
|
2018-10-16 21:38:12 +02:00
|
|
|
|
2021-09-28 11:06:59 +02:00
|
|
|
HEALTHCHECK CMD curl -f -L -H 'User-Agent: health' http://localhost/ || exit 1
|
2021-11-03 16:18:00 +02:00
|
|
|
|
2021-12-17 23:23:08 +02:00
|
|
|
RUN echo $VERSION >> /version
|