nextcloud/build-common/dockerfile/Dockerfile-fpm

45 lines
1.4 KiB
Plaintext
Raw Normal View History

2024-06-02 23:37:22 +00:00
# retrieve the base image (default to latest).
ARG BASE_IMAGE="nextcloud:29-fpm"
FROM ${BASE_IMAGE}
LABEL org.opencontainers.image.authors="Belman Kraul <bkraul@gmail.com>"
2020-07-03 16:03:06 +00:00
RUN set -ex \
usermod -u 82 www-data; \
groupmod -g 82 www-data; \
usermod -g 82 www-data; \
# for some reason this needs to be repeated.
usermod -u 82 www-data; \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www
RUN set -ex; \
apt-get update; \
2024-06-02 23:37:22 +00:00
apt-get install -y libmagickcore-6.q16-3-extra libsmbclient; \
2020-07-03 16:03:06 +00:00
rm -rf /var/lib/apt/lists/*;
RUN set -ex; \
savedAptMark="$(apt-mark showmanual)"; \
apt-get update; \
apt-get install -y libsmbclient-dev; \
pecl install smbclient; \
docker-php-ext-enable smbclient; \
2024-06-02 23:37:22 +00:00
apt-get install -y libbz2-dev; \
docker-php-ext-install bz2; \
# reset apt-mark's "manual" list so that "purge --auto-remove" will remove all build dependencies
2020-07-03 16:03:06 +00:00
apt-mark auto '.*' > /dev/null; \
apt-mark manual $savedAptMark; \
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 -rt apt-mark manual; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \
rm -rf /var/lib/apt/lists/*
2024-06-02 23:37:22 +00:00
# copy the redis configuration file.
COPY redis/redis.config.php /usr/src/nextcloud/config/redis.config.php