FROM php:8.1-apache LABEL maintainer="Torben Nehmer " 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 \ libpspell-dev \ libonig-dev \ libldap-common \ # ISPConfig requirement libxml2-dev \ ; \ \ debMultiarch="$(dpkg-architecture --query DEB_BUILD_MULTIARCH)"; \ docker-php-ext-configure gd --with-jpeg --with-freetype ; \ docker-php-ext-configure ldap --with-libdir="lib/$debMultiarch"; \ docker-php-ext-install \ exif \ gd \ intl \ ldap \ pdo_mysql \ pdo_pgsql \ pdo_sqlite \ zip \ pspell \ # ISPConfig requirement soap \ ; \ pecl install imagick redis; \ docker-php-ext-enable imagick opcache redis; \ \ # 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; \ 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 }' \ | 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; \ apt-get clean ;\ 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 # expose these volumes VOLUME /var/roundcube/config # Define Roundcubemail version ENV ROUNDCUBEMAIL_VERSION 1.6.3 # Set the entry point ENTRYPOINT ["/docker-entrypoint.sh"] CMD ["apache2-foreground"] # 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 /