2023-10-07 08:52:56 +00:00
|
|
|
FROM php:8.1-apache
|
2018-10-24 20:45:58 +00:00
|
|
|
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 \
|
2023-10-07 08:52:56 +00:00
|
|
|
libmagickwand-dev \
|
2018-10-24 20:45:58 +00:00
|
|
|
libpng-dev \
|
|
|
|
libpq-dev \
|
|
|
|
libsqlite3-dev \
|
2020-02-20 18:07:04 +00:00
|
|
|
libzip-dev \
|
2023-10-07 08:52:56 +00:00
|
|
|
libpspell-dev \
|
|
|
|
libonig-dev \
|
|
|
|
libldap-common \
|
2018-10-24 20:45:58 +00:00
|
|
|
# ISPConfig requirement
|
|
|
|
libxml2-dev \
|
|
|
|
; \
|
|
|
|
\
|
|
|
|
debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \
|
2023-10-07 08:52:56 +00:00
|
|
|
docker-php-ext-configure gd --with-jpeg --with-freetype ; \
|
2018-10-24 20:45:58 +00:00
|
|
|
docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \
|
|
|
|
docker-php-ext-install \
|
|
|
|
exif \
|
|
|
|
gd \
|
|
|
|
intl \
|
|
|
|
ldap \
|
|
|
|
pdo_mysql \
|
|
|
|
pdo_pgsql \
|
|
|
|
pdo_sqlite \
|
|
|
|
zip \
|
2023-10-07 08:52:56 +00:00
|
|
|
pspell \
|
2018-10-24 20:45:58 +00:00
|
|
|
# ISPConfig requirement
|
|
|
|
soap \
|
|
|
|
; \
|
2023-10-07 08:52:56 +00:00
|
|
|
pecl install imagick redis; \
|
|
|
|
docker-php-ext-enable imagick opcache redis; \
|
2018-10-24 20:45:58 +00:00
|
|
|
\
|
|
|
|
# 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; \
|
2023-10-07 08:52:56 +00:00
|
|
|
extdir="$(php -r 'echo ini_get("extension_dir");')"; \
|
|
|
|
ldd "$extdir"/*.so \
|
|
|
|
| awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \
|
2018-10-24 20:45:58 +00:00
|
|
|
| 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; \
|
2018-11-08 21:12:44 +00:00
|
|
|
apt-get clean ;\
|
2023-10-07 08:52:56 +00:00
|
|
|
ldd "$extdir"/*.so | grep -qzv "=> not found" || (echo "Sanity check failed: missing libraries:"; ldd "$extdir"/*.so | grep " => not found"; exit 1); \
|
|
|
|
ldd "$extdir"/*.so | grep -q "libzip.so.* => .*/libzip.so.*" || (echo "Sanity check failed: libzip.so is not referenced"; ldd "$extdir"/*.so; exit 1); \
|
|
|
|
err="$(php --version 3>&1 1>&2 2>&3)"; \
|
|
|
|
[ -z "$err" ] || (echo "Sanity check failed: php returned errors; $err"; exit 1;);
|
|
|
|
|
|
|
|
# installto.sh dependencies
|
|
|
|
RUN set -ex; \
|
|
|
|
\
|
|
|
|
apt-get update; \
|
|
|
|
apt-get install -y --no-install-recommends \
|
|
|
|
aspell \
|
|
|
|
aspell-en \
|
|
|
|
aspell-de \
|
|
|
|
aspell-fr \
|
|
|
|
rsync \
|
|
|
|
unzip \
|
|
|
|
locales \
|
|
|
|
; \
|
|
|
|
\
|
|
|
|
echo "de_DE.UTF-8 UTF-8" > /etc/locale.gen ; \
|
|
|
|
/usr/sbin/locale-gen ; \
|
|
|
|
rm -rf /var/lib/apt/lists/* ; \
|
|
|
|
mkdir -p /usr/src/roundcubemail/logs ; \
|
|
|
|
chown -R www-data:www-data /usr/src/roundcubemail/logs ;
|
|
|
|
|
|
|
|
COPY --from=composer:2 /usr/bin/composer /usr/bin/composer
|
|
|
|
|
|
|
|
RUN a2enmod rewrite
|
2018-10-24 20:45:58 +00:00
|
|
|
|
|
|
|
# expose these volumes
|
|
|
|
VOLUME /var/roundcube/config
|
|
|
|
|
|
|
|
# Define Roundcubemail version
|
2023-10-07 08:52:56 +00:00
|
|
|
ENV ROUNDCUBEMAIL_VERSION 1.6.3
|
2018-10-24 20:45:58 +00:00
|
|
|
|
2018-10-25 20:10:01 +00:00
|
|
|
# Set the entry point
|
2018-10-24 20:45:58 +00:00
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
|
|
CMD ["apache2-foreground"]
|
2018-10-25 20:10:01 +00:00
|
|
|
|
|
|
|
# Finally, publish the rootfs file into the container
|
|
|
|
# This is done as last step to make docker build caching more efficient.
|
|
|
|
ADD rootfs.tar.gz /
|