mirror of
https://github.com/roundcube/roundcubemail-docker.git
synced 2026-05-04 18:36:17 +02:00
94 lines
3.0 KiB
Docker
94 lines
3.0 KiB
Docker
FROM php:7.3-fpm-alpine
|
|
LABEL maintainer="Thomas Bruederli <thomas@roundcube.net>"
|
|
|
|
# entrypoint.sh and installto.sh dependencies
|
|
RUN set -ex; \
|
|
\
|
|
apk add --no-cache \
|
|
bash \
|
|
coreutils \
|
|
rsync \
|
|
tzdata
|
|
|
|
RUN set -ex; \
|
|
\
|
|
apk add --no-cache --virtual .build-deps \
|
|
icu-dev \
|
|
libjpeg-turbo-dev \
|
|
libpng-dev \
|
|
libzip-dev \
|
|
openldap-dev \
|
|
postgresql-dev \
|
|
sqlite-dev \
|
|
; \
|
|
\
|
|
docker-php-ext-configure gd --with-png-dir=/usr --with-jpeg-dir=/usr; \
|
|
docker-php-ext-configure ldap; \
|
|
docker-php-ext-install \
|
|
exif \
|
|
gd \
|
|
intl \
|
|
ldap \
|
|
pdo_mysql \
|
|
pdo_pgsql \
|
|
pdo_sqlite \
|
|
zip \
|
|
; \
|
|
\
|
|
runDeps="$( \
|
|
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
|
|
| tr ',' '\n' \
|
|
| sort -u \
|
|
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
|
)"; \
|
|
apk add --virtual .roundcubemail-phpext-rundeps $runDeps; \
|
|
apk del .build-deps
|
|
|
|
# add composer.phar
|
|
ADD https://getcomposer.org/installer /tmp/composer-installer.php
|
|
|
|
RUN php /tmp/composer-installer.php --install-dir=/usr/local/bin/; \
|
|
rm /tmp/composer-installer.php
|
|
|
|
# expose these volumes
|
|
VOLUME /var/roundcube/config
|
|
VOLUME /var/roundcube/db
|
|
VOLUME /var/www/html
|
|
VOLUME /tmp/roundcube-temp
|
|
|
|
# Define Roundcubemail version
|
|
ENV ROUNDCUBEMAIL_VERSION 1.4.9
|
|
|
|
# Download package and extract to web volume
|
|
RUN set -ex; \
|
|
apk add --no-cache --virtual .fetch-deps \
|
|
gnupg \
|
|
; \
|
|
\
|
|
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; \
|
|
apk del .fetch-deps
|
|
|
|
# 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 ["php-fpm"]
|