Created
April 1, 2024 22:51
-
-
Save EuleMitKeule/8ec970a48aadfd1dc829eaddde443059 to your computer and use it in GitHub Desktop.
Nextcloud Dockerfile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nextcloud:28.0.3 | |
RUN set -ex; \ | |
\ | |
apt-get update; \ | |
apt-get install -y --no-install-recommends \ | |
ffmpeg \ | |
ghostscript \ | |
libmagickcore-6.q16-6-extra \ | |
procps \ | |
smbclient \ | |
supervisor \ | |
# libreoffice \ | |
; \ | |
rm -rf /var/lib/apt/lists/* | |
RUN set -ex; \ | |
\ | |
savedAptMark="$(apt-mark showmanual)"; \ | |
\ | |
apt-get update; \ | |
apt-get install -y --no-install-recommends \ | |
libbz2-dev \ | |
libc-client-dev \ | |
libkrb5-dev \ | |
libsmbclient-dev \ | |
; \ | |
\ | |
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \ | |
docker-php-ext-install \ | |
bz2 \ | |
imap \ | |
inotify \ | |
; \ | |
pecl install smbclient; \ | |
pecl install inotify; \ | |
docker-php-ext-enable smbclient; \ | |
docker-php-ext-enable inotify; \ | |
\ | |
# 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 '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); print so }' \ | |
| sort -u \ | |
| xargs -r dpkg-query --search \ | |
| 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/* | |
RUN mkdir -p \ | |
/var/log/supervisord \ | |
/var/run/supervisord \ | |
; | |
COPY supervisord.conf / | |
ENV NEXTCLOUD_UPDATE=1 | |
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment