39 lines
1.1 KiB
Docker
39 lines
1.1 KiB
Docker
|
FROM nextcloud:21-fpm
|
||
|
|
||
|
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; \
|
||
|
apt-get install -y \
|
||
|
libmagickcore-6.q16-3-extra; \
|
||
|
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; \
|
||
|
# 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; \
|
||
|
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/*
|
||
|
|
||
|
COPY redis.config.php /usr/src/nextcloud/config/redis.config.php
|