Merge pull request #596 from J0WI/alpine-examples
Add Alpine variant to Dockerfile examples
This commit is contained in:
commit
eed21207f1
@ -21,7 +21,7 @@ Example | Description
|
|||||||
### full
|
### full
|
||||||
The `full` Dockerfile example adds dependencies for all optional packages suggested by nextcloud that may be needed for some features (e.g. Video Preview Generation), as stated in the [Administration Manual](https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html).
|
The `full` Dockerfile example adds dependencies for all optional packages suggested by nextcloud that may be needed for some features (e.g. Video Preview Generation), as stated in the [Administration Manual](https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html).
|
||||||
|
|
||||||
NOTE: The Dockerfile does not install the LibreOffice package (line is commented), because it would increase the generated Image size by approximately 500 MB. In order to install it, simply uncomment the 13th line of the Dockerfile.
|
NOTE: The Dockerfile does not install the LibreOffice package (line is commented), because it would increase the generated Image size by approximately 500 MB. In order to install it, simply uncomment the appropriate line in the Dockerfile.
|
||||||
|
|
||||||
NOTE: Per default, only previews for BMP, GIF, JPEG, MarkDown, MP3, PNG, TXT, and XBitmap Files are generated. The configuration of the preview generation can be done in config.php, as explained in the [Administration Manual](https://docs.nextcloud.com/server/12/admin_manual/configuration_server/config_sample_php_parameters.html#previews)
|
NOTE: Per default, only previews for BMP, GIF, JPEG, MarkDown, MP3, PNG, TXT, and XBitmap Files are generated. The configuration of the preview generation can be done in config.php, as explained in the [Administration Manual](https://docs.nextcloud.com/server/12/admin_manual/configuration_server/config_sample_php_parameters.html#previews)
|
||||||
|
|
||||||
|
10
.examples/dockerfiles/cron/fpm-alpine/Dockerfile
Normal file
10
.examples/dockerfiles/cron/fpm-alpine/Dockerfile
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
FROM nextcloud:fpm-alpine
|
||||||
|
|
||||||
|
RUN apk add --no-cache supervisor \
|
||||||
|
&& mkdir /var/log/supervisord /var/run/supervisord
|
||||||
|
|
||||||
|
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
|
||||||
|
ENV NEXTCLOUD_UPDATE=1
|
||||||
|
|
||||||
|
CMD ["/usr/bin/supervisord"]
|
22
.examples/dockerfiles/cron/fpm-alpine/supervisord.conf
Normal file
22
.examples/dockerfiles/cron/fpm-alpine/supervisord.conf
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[supervisord]
|
||||||
|
nodaemon=true
|
||||||
|
logfile=/var/log/supervisord/supervisord.log
|
||||||
|
pidfile=/var/run/supervisord/supervisord.pid
|
||||||
|
childlogdir=/var/log/supervisord/
|
||||||
|
logfile_maxbytes=50MB ; maximum size of logfile before rotation
|
||||||
|
logfile_backups=10 ; number of backed up logfiles
|
||||||
|
loglevel=error
|
||||||
|
|
||||||
|
[program:php-fpm]
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
command=php-fpm
|
||||||
|
|
||||||
|
[program:cron]
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
command=/cron.sh
|
@ -1,23 +1,58 @@
|
|||||||
FROM nextcloud:apache
|
FROM nextcloud:apache
|
||||||
|
|
||||||
RUN mkdir -p /usr/share/man/man1 \
|
RUN set -ex; \
|
||||||
&& apt-get update && apt-get install -y \
|
\
|
||||||
supervisor \
|
apt-get update; \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
libbz2-dev \
|
|
||||||
libgmp3-dev \
|
|
||||||
libc-client-dev \
|
|
||||||
libkrb5-dev \
|
|
||||||
smbclient \
|
smbclient \
|
||||||
libsmbclient-dev \
|
supervisor \
|
||||||
# libreoffice \
|
# libreoffice \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
; \
|
||||||
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
|
rm -rf /var/lib/apt/lists/*
|
||||||
&& ln -s "/usr/include/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)/gmp.h" /usr/include/gmp.h \
|
|
||||||
&& docker-php-ext-install bz2 gmp imap \
|
RUN set -ex; \
|
||||||
&& pecl install smbclient \
|
\
|
||||||
&& docker-php-ext-enable smbclient \
|
savedAptMark="$(apt-mark showmanual)"; \
|
||||||
&& mkdir /var/log/supervisord /var/run/supervisord
|
\
|
||||||
|
apt-get update; \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
libbz2-dev \
|
||||||
|
libc-client-dev \
|
||||||
|
libgmp3-dev \
|
||||||
|
libkrb5-dev \
|
||||||
|
libsmbclient-dev \
|
||||||
|
; \
|
||||||
|
\
|
||||||
|
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
|
||||||
|
ln -s "/usr/include/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)/gmp.h" /usr/include/gmp.h; \
|
||||||
|
docker-php-ext-install \
|
||||||
|
bz2 \
|
||||||
|
gmp \
|
||||||
|
imap \
|
||||||
|
; \
|
||||||
|
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/*
|
||||||
|
|
||||||
|
RUN mkdir -p \
|
||||||
|
/usr/share/man/man1 \
|
||||||
|
/var/log/supervisord \
|
||||||
|
/var/run/supervisord \
|
||||||
|
;
|
||||||
|
|
||||||
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
|
||||||
|
52
.examples/dockerfiles/full/fpm-alpine/Dockerfile
Normal file
52
.examples/dockerfiles/full/fpm-alpine/Dockerfile
Normal file
@ -0,0 +1,52 @@
|
|||||||
|
FROM nextcloud:fpm-alpine
|
||||||
|
|
||||||
|
RUN set -ex; \
|
||||||
|
\
|
||||||
|
apk add --no-cache \
|
||||||
|
ffmpeg \
|
||||||
|
samba-client \
|
||||||
|
supervisor \
|
||||||
|
# libreoffice \
|
||||||
|
;
|
||||||
|
|
||||||
|
RUN set -ex; \
|
||||||
|
\
|
||||||
|
apk add --no-cache --virtual .build-deps \
|
||||||
|
$PHPIZE_DEPS \
|
||||||
|
imap-dev \
|
||||||
|
krb5-dev \
|
||||||
|
libressl-dev \
|
||||||
|
samba-dev \
|
||||||
|
bzip2-dev \
|
||||||
|
gmp-dev \
|
||||||
|
; \
|
||||||
|
\
|
||||||
|
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
|
||||||
|
docker-php-ext-install \
|
||||||
|
bz2 \
|
||||||
|
gmp \
|
||||||
|
imap \
|
||||||
|
; \
|
||||||
|
pecl install smbclient; \
|
||||||
|
docker-php-ext-enable smbclient; \
|
||||||
|
\
|
||||||
|
runDeps="$( \
|
||||||
|
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
|
||||||
|
| tr ',' '\n' \
|
||||||
|
| sort -u \
|
||||||
|
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
||||||
|
)"; \
|
||||||
|
apk add --virtual .nextcloud-phpext-rundeps $runDeps; \
|
||||||
|
apk del .build-deps
|
||||||
|
|
||||||
|
RUN mkdir -p \
|
||||||
|
/usr/share/man/man1 \
|
||||||
|
/var/log/supervisord \
|
||||||
|
/var/run/supervisord \
|
||||||
|
;
|
||||||
|
|
||||||
|
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
|
||||||
|
ENV NEXTCLOUD_UPDATE=1
|
||||||
|
|
||||||
|
CMD ["/usr/bin/supervisord"]
|
22
.examples/dockerfiles/full/fpm-alpine/supervisord.conf
Normal file
22
.examples/dockerfiles/full/fpm-alpine/supervisord.conf
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
[supervisord]
|
||||||
|
nodaemon=true
|
||||||
|
logfile=/var/log/supervisord/supervisord.log
|
||||||
|
pidfile=/var/run/supervisord/supervisord.pid
|
||||||
|
childlogdir=/var/log/supervisord/
|
||||||
|
logfile_maxbytes=50MB ; maximum size of logfile before rotation
|
||||||
|
logfile_backups=10 ; number of backed up logfiles
|
||||||
|
loglevel=error
|
||||||
|
|
||||||
|
[program:php-fpm]
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
command=php-fpm
|
||||||
|
|
||||||
|
[program:cron]
|
||||||
|
stdout_logfile=/dev/stdout
|
||||||
|
stdout_logfile_maxbytes=0
|
||||||
|
stderr_logfile=/dev/stderr
|
||||||
|
stderr_logfile_maxbytes=0
|
||||||
|
command=/cron.sh
|
@ -1,23 +1,58 @@
|
|||||||
FROM nextcloud:fpm
|
FROM nextcloud:fpm
|
||||||
|
|
||||||
RUN mkdir -p /usr/share/man/man1 \
|
RUN set -ex; \
|
||||||
&& apt-get update && apt-get install -y \
|
\
|
||||||
supervisor \
|
apt-get update; \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
libbz2-dev \
|
|
||||||
libgmp3-dev \
|
|
||||||
libc-client-dev \
|
|
||||||
libkrb5-dev \
|
|
||||||
smbclient \
|
smbclient \
|
||||||
libsmbclient-dev \
|
supervisor \
|
||||||
# libreoffice \
|
# libreoffice \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
; \
|
||||||
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
|
rm -rf /var/lib/apt/lists/*
|
||||||
&& ln -s "/usr/include/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)/gmp.h" /usr/include/gmp.h \
|
|
||||||
&& docker-php-ext-install bz2 gmp imap \
|
RUN set -ex; \
|
||||||
&& pecl install smbclient \
|
\
|
||||||
&& docker-php-ext-enable smbclient \
|
savedAptMark="$(apt-mark showmanual)"; \
|
||||||
&& mkdir /var/log/supervisord /var/run/supervisord
|
\
|
||||||
|
apt-get update; \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
libbz2-dev \
|
||||||
|
libc-client-dev \
|
||||||
|
libgmp3-dev \
|
||||||
|
libkrb5-dev \
|
||||||
|
libsmbclient-dev \
|
||||||
|
; \
|
||||||
|
\
|
||||||
|
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
|
||||||
|
ln -s "/usr/include/$(dpkg-architecture --query DEB_BUILD_MULTIARCH)/gmp.h" /usr/include/gmp.h; \
|
||||||
|
docker-php-ext-install \
|
||||||
|
bz2 \
|
||||||
|
gmp \
|
||||||
|
imap \
|
||||||
|
; \
|
||||||
|
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/*
|
||||||
|
|
||||||
|
RUN mkdir -p \
|
||||||
|
/usr/share/man/man1 \
|
||||||
|
/var/log/supervisord \
|
||||||
|
/var/run/supervisord \
|
||||||
|
;
|
||||||
|
|
||||||
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
||||||
|
|
||||||
|
@ -1,7 +1,28 @@
|
|||||||
FROM nextcloud:apache
|
FROM nextcloud:apache
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN set -ex; \
|
||||||
&& apt-get install -y libc-client-dev libkrb5-dev \
|
\
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
savedAptMark="$(apt-mark showmanual)"; \
|
||||||
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
|
\
|
||||||
&& docker-php-ext-install imap
|
apt-get update; \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
libc-client-dev \
|
||||||
|
libkrb5-dev \
|
||||||
|
; \
|
||||||
|
\
|
||||||
|
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
|
||||||
|
docker-php-ext-install imap; \
|
||||||
|
\
|
||||||
|
# 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/*
|
||||||
|
22
.examples/dockerfiles/imap/fpm-alpine/Dockerfile
Normal file
22
.examples/dockerfiles/imap/fpm-alpine/Dockerfile
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
FROM nextcloud:fpm-alpine
|
||||||
|
|
||||||
|
RUN set -ex; \
|
||||||
|
\
|
||||||
|
apk add --no-cache --virtual .build-deps \
|
||||||
|
$PHPIZE_DEPS \
|
||||||
|
imap-dev \
|
||||||
|
krb5-dev \
|
||||||
|
libressl-dev \
|
||||||
|
; \
|
||||||
|
\
|
||||||
|
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
|
||||||
|
docker-php-ext-install imap; \
|
||||||
|
\
|
||||||
|
runDeps="$( \
|
||||||
|
scanelf --needed --nobanner --format '%n#p' --recursive /usr/local/lib/php/extensions \
|
||||||
|
| tr ',' '\n' \
|
||||||
|
| sort -u \
|
||||||
|
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
|
||||||
|
)"; \
|
||||||
|
apk add --virtual .nextcloud-phpext-rundeps $runDeps; \
|
||||||
|
apk del .build-deps
|
@ -1,7 +1,28 @@
|
|||||||
FROM nextcloud:fpm
|
FROM nextcloud:fpm
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN set -ex; \
|
||||||
&& apt-get install -y libc-client-dev libkrb5-dev \
|
\
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
savedAptMark="$(apt-mark showmanual)"; \
|
||||||
&& docker-php-ext-configure imap --with-kerberos --with-imap-ssl \
|
\
|
||||||
&& docker-php-ext-install imap
|
apt-get update; \
|
||||||
|
apt-get install -y --no-install-recommends \
|
||||||
|
libc-client-dev \
|
||||||
|
libkrb5-dev \
|
||||||
|
; \
|
||||||
|
\
|
||||||
|
docker-php-ext-configure imap --with-kerberos --with-imap-ssl; \
|
||||||
|
docker-php-ext-install imap; \
|
||||||
|
\
|
||||||
|
# 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/*
|
||||||
|
3
.examples/dockerfiles/smb/fpm-alpine/Dockerfile
Normal file
3
.examples/dockerfiles/smb/fpm-alpine/Dockerfile
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
FROM nextcloud:fpm-alpine
|
||||||
|
|
||||||
|
RUN apk add --no-cache samba-client
|
Loading…
Reference in New Issue
Block a user