relocate src extraction to its own stage
This commit is contained in:
parent
cf41fc0bdc
commit
9b8360df1c
@ -1,4 +1,20 @@
|
||||
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
||||
FROM php:8.3-apache-trixie AS usr-src
|
||||
RUN --mount=type=cache,sharing=locked,target=/var/lib/apt \
|
||||
--mount=type=cache,sharing=locked,target=/var/cache/apt \
|
||||
apt-get update -y && \
|
||||
apt-get install -y gnupg dirmngr
|
||||
ADD https://github.com/nextcloud-releases/server/releases/download/v31.0.12/nextcloud-31.0.12.tar.bz2 nextcloud.tar.bz2
|
||||
ADD https://github.com/nextcloud-releases/server/releases/download/v31.0.12/nextcloud-31.0.12.tar.bz2.asc nextcloud.tar.bz2.asc
|
||||
RUN tar -xjf nextcloud.tar.bz2 -C /usr/src/ && \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A && \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 && \
|
||||
rm -rf /usr/src/nextcloud/updater && \
|
||||
mkdir -p /usr/src/nextcloud/data && \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps && \
|
||||
chmod +x /usr/src/nextcloud/occ
|
||||
|
||||
FROM php:8.3-apache-trixie
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
@ -20,10 +36,12 @@ RUN set -ex; \
|
||||
|
||||
# install the PHP extensions we need
|
||||
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
||||
ENV PHP_MEMORY_LIMIT 512M
|
||||
ENV PHP_UPLOAD_LIMIT 512M
|
||||
ENV PHP_OPCACHE_MEMORY_CONSUMPTION 128
|
||||
RUN set -ex; \
|
||||
ENV PHP_MEMORY_LIMIT=512M \
|
||||
PHP_UPLOAD_LIMIT=512M \
|
||||
PHP_OPCACHE_MEMORY_CONSUMPTION=128
|
||||
RUN --mount=type=cache,sharing=locked,target=/var/lib/apt \
|
||||
--mount=type=cache,sharing=locked,target=/var/cache/apt \
|
||||
set -ex; \
|
||||
\
|
||||
savedAptMark="$(apt-mark showmanual)"; \
|
||||
\
|
||||
@ -145,39 +163,14 @@ RUN a2enmod headers rewrite remoteip ; \
|
||||
a2enconf remoteip
|
||||
|
||||
# set apache config LimitRequestBody
|
||||
ENV APACHE_BODY_LIMIT 1073741824
|
||||
ENV APACHE_BODY_LIMIT=1073741824
|
||||
RUN { \
|
||||
echo 'LimitRequestBody ${APACHE_BODY_LIMIT}'; \
|
||||
} > /etc/apache2/conf-available/apache-limits.conf; \
|
||||
a2enconf apache-limits
|
||||
|
||||
ENV NEXTCLOUD_VERSION 31.0.12
|
||||
|
||||
RUN set -ex; \
|
||||
fetchDeps=" \
|
||||
gnupg \
|
||||
dirmngr \
|
||||
"; \
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends $fetchDeps; \
|
||||
\
|
||||
curl -fsSL -o nextcloud.tar.bz2 "https://github.com/nextcloud-releases/server/releases/download/v31.0.12/nextcloud-31.0.12.tar.bz2"; \
|
||||
curl -fsSL -o nextcloud.tar.bz2.asc "https://github.com/nextcloud-releases/server/releases/download/v31.0.12/nextcloud-31.0.12.tar.bz2.asc"; \
|
||||
export GNUPGHOME="$(mktemp -d)"; \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
tar -xjf nextcloud.tar.bz2 -C /usr/src/; \
|
||||
gpgconf --kill all; \
|
||||
rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \
|
||||
mkdir -p /usr/src/nextcloud/data; \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps; \
|
||||
chmod +x /usr/src/nextcloud/occ; \
|
||||
\
|
||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
|
||||
apt-get dist-clean
|
||||
|
||||
ENV NEXTCLOUD_VERSION=31.0.12
|
||||
COPY --from=usr-src /usr/src/ /usr/src/
|
||||
COPY *.sh upgrade.exclude /
|
||||
COPY config/* /usr/src/nextcloud/config/
|
||||
|
||||
|
||||
@ -1,4 +1,21 @@
|
||||
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
|
||||
# This uses the same one as debian in order to leverage build cache
|
||||
FROM php:8.3-fpm-trixie AS usr-src
|
||||
RUN --mount=type=cache,sharing=locked,target=/var/lib/apt \
|
||||
--mount=type=cache,sharing=locked,target=/var/cache/apt \
|
||||
apt-get update -y && \
|
||||
apt-get install -y gnupg dirmngr
|
||||
ADD https://github.com/nextcloud-releases/server/releases/download/v31.0.12/nextcloud-31.0.12.tar.bz2 nextcloud.tar.bz2
|
||||
ADD https://github.com/nextcloud-releases/server/releases/download/v31.0.12/nextcloud-31.0.12.tar.bz2.asc nextcloud.tar.bz2.asc
|
||||
RUN tar -xjf nextcloud.tar.bz2 -C /usr/src/ && \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A && \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 && \
|
||||
rm -rf /usr/src/nextcloud/updater && \
|
||||
mkdir -p /usr/src/nextcloud/data && \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps && \
|
||||
chmod +x /usr/src/nextcloud/occ
|
||||
|
||||
FROM php:8.3-fpm-alpine3.22
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
@ -90,9 +107,9 @@ RUN set -ex; \
|
||||
|
||||
# set recommended PHP.ini settings
|
||||
# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache
|
||||
ENV PHP_MEMORY_LIMIT 512M
|
||||
ENV PHP_UPLOAD_LIMIT 512M
|
||||
ENV PHP_OPCACHE_MEMORY_CONSUMPTION 128
|
||||
ENV PHP_MEMORY_LIMIT=512M
|
||||
ENV PHP_UPLOAD_LIMIT=512M
|
||||
ENV PHP_OPCACHE_MEMORY_CONSUMPTION=128
|
||||
RUN { \
|
||||
echo 'opcache.enable=1'; \
|
||||
echo 'opcache.interned_strings_buffer=32'; \
|
||||
@ -129,29 +146,9 @@ RUN { \
|
||||
VOLUME /var/www/html
|
||||
|
||||
|
||||
ENV NEXTCLOUD_VERSION 31.0.12
|
||||
|
||||
RUN set -ex; \
|
||||
apk add --no-cache --virtual .fetch-deps \
|
||||
bzip2 \
|
||||
gnupg \
|
||||
; \
|
||||
\
|
||||
curl -fsSL -o nextcloud.tar.bz2 "https://github.com/nextcloud-releases/server/releases/download/v31.0.12/nextcloud-31.0.12.tar.bz2"; \
|
||||
curl -fsSL -o nextcloud.tar.bz2.asc "https://github.com/nextcloud-releases/server/releases/download/v31.0.12/nextcloud-31.0.12.tar.bz2.asc"; \
|
||||
export GNUPGHOME="$(mktemp -d)"; \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
tar -xjf nextcloud.tar.bz2 -C /usr/src/; \
|
||||
gpgconf --kill all; \
|
||||
rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \
|
||||
mkdir -p /usr/src/nextcloud/data; \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps; \
|
||||
chmod +x /usr/src/nextcloud/occ; \
|
||||
apk del --no-network .fetch-deps
|
||||
ENV NEXTCLOUD_VERSION=31.0.12
|
||||
|
||||
COPY --from=usr-src /usr/src/ /usr/src/
|
||||
COPY *.sh upgrade.exclude /
|
||||
COPY config/* /usr/src/nextcloud/config/
|
||||
|
||||
|
||||
@ -1,4 +1,20 @@
|
||||
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
||||
FROM php:8.3-fpm-trixie AS usr-src
|
||||
RUN --mount=type=cache,sharing=locked,target=/var/lib/apt \
|
||||
--mount=type=cache,sharing=locked,target=/var/cache/apt \
|
||||
apt-get update -y && \
|
||||
apt-get install -y gnupg dirmngr
|
||||
ADD https://github.com/nextcloud-releases/server/releases/download/v31.0.12/nextcloud-31.0.12.tar.bz2 nextcloud.tar.bz2
|
||||
ADD https://github.com/nextcloud-releases/server/releases/download/v31.0.12/nextcloud-31.0.12.tar.bz2.asc nextcloud.tar.bz2.asc
|
||||
RUN tar -xjf nextcloud.tar.bz2 -C /usr/src/ && \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A && \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 && \
|
||||
rm -rf /usr/src/nextcloud/updater && \
|
||||
mkdir -p /usr/src/nextcloud/data && \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps && \
|
||||
chmod +x /usr/src/nextcloud/occ
|
||||
|
||||
FROM php:8.3-fpm-trixie
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
@ -20,10 +36,12 @@ RUN set -ex; \
|
||||
|
||||
# install the PHP extensions we need
|
||||
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
||||
ENV PHP_MEMORY_LIMIT 512M
|
||||
ENV PHP_UPLOAD_LIMIT 512M
|
||||
ENV PHP_OPCACHE_MEMORY_CONSUMPTION 128
|
||||
RUN set -ex; \
|
||||
ENV PHP_MEMORY_LIMIT=512M \
|
||||
PHP_UPLOAD_LIMIT=512M \
|
||||
PHP_OPCACHE_MEMORY_CONSUMPTION=128
|
||||
RUN --mount=type=cache,sharing=locked,target=/var/lib/apt \
|
||||
--mount=type=cache,sharing=locked,target=/var/cache/apt \
|
||||
set -ex; \
|
||||
\
|
||||
savedAptMark="$(apt-mark showmanual)"; \
|
||||
\
|
||||
@ -136,33 +154,8 @@ RUN { \
|
||||
VOLUME /var/www/html
|
||||
|
||||
|
||||
ENV NEXTCLOUD_VERSION 31.0.12
|
||||
|
||||
RUN set -ex; \
|
||||
fetchDeps=" \
|
||||
gnupg \
|
||||
dirmngr \
|
||||
"; \
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends $fetchDeps; \
|
||||
\
|
||||
curl -fsSL -o nextcloud.tar.bz2 "https://github.com/nextcloud-releases/server/releases/download/v31.0.12/nextcloud-31.0.12.tar.bz2"; \
|
||||
curl -fsSL -o nextcloud.tar.bz2.asc "https://github.com/nextcloud-releases/server/releases/download/v31.0.12/nextcloud-31.0.12.tar.bz2.asc"; \
|
||||
export GNUPGHOME="$(mktemp -d)"; \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
tar -xjf nextcloud.tar.bz2 -C /usr/src/; \
|
||||
gpgconf --kill all; \
|
||||
rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \
|
||||
mkdir -p /usr/src/nextcloud/data; \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps; \
|
||||
chmod +x /usr/src/nextcloud/occ; \
|
||||
\
|
||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
|
||||
apt-get dist-clean
|
||||
|
||||
ENV NEXTCLOUD_VERSION=31.0.12
|
||||
COPY --from=usr-src /usr/src/ /usr/src/
|
||||
COPY *.sh upgrade.exclude /
|
||||
COPY config/* /usr/src/nextcloud/config/
|
||||
|
||||
|
||||
@ -1,4 +1,20 @@
|
||||
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
||||
FROM php:8.3-apache-trixie AS usr-src
|
||||
RUN --mount=type=cache,sharing=locked,target=/var/lib/apt \
|
||||
--mount=type=cache,sharing=locked,target=/var/cache/apt \
|
||||
apt-get update -y && \
|
||||
apt-get install -y gnupg dirmngr
|
||||
ADD https://github.com/nextcloud-releases/server/releases/download/v32.0.3/nextcloud-32.0.3.tar.bz2 nextcloud.tar.bz2
|
||||
ADD https://github.com/nextcloud-releases/server/releases/download/v32.0.3/nextcloud-32.0.3.tar.bz2.asc nextcloud.tar.bz2.asc
|
||||
RUN tar -xjf nextcloud.tar.bz2 -C /usr/src/ && \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A && \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 && \
|
||||
rm -rf /usr/src/nextcloud/updater && \
|
||||
mkdir -p /usr/src/nextcloud/data && \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps && \
|
||||
chmod +x /usr/src/nextcloud/occ
|
||||
|
||||
FROM php:8.3-apache-trixie
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
@ -20,10 +36,12 @@ RUN set -ex; \
|
||||
|
||||
# install the PHP extensions we need
|
||||
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
||||
ENV PHP_MEMORY_LIMIT 512M
|
||||
ENV PHP_UPLOAD_LIMIT 512M
|
||||
ENV PHP_OPCACHE_MEMORY_CONSUMPTION 128
|
||||
RUN set -ex; \
|
||||
ENV PHP_MEMORY_LIMIT=512M \
|
||||
PHP_UPLOAD_LIMIT=512M \
|
||||
PHP_OPCACHE_MEMORY_CONSUMPTION=128
|
||||
RUN --mount=type=cache,sharing=locked,target=/var/lib/apt \
|
||||
--mount=type=cache,sharing=locked,target=/var/cache/apt \
|
||||
set -ex; \
|
||||
\
|
||||
savedAptMark="$(apt-mark showmanual)"; \
|
||||
\
|
||||
@ -145,39 +163,14 @@ RUN a2enmod headers rewrite remoteip ; \
|
||||
a2enconf remoteip
|
||||
|
||||
# set apache config LimitRequestBody
|
||||
ENV APACHE_BODY_LIMIT 1073741824
|
||||
ENV APACHE_BODY_LIMIT=1073741824
|
||||
RUN { \
|
||||
echo 'LimitRequestBody ${APACHE_BODY_LIMIT}'; \
|
||||
} > /etc/apache2/conf-available/apache-limits.conf; \
|
||||
a2enconf apache-limits
|
||||
|
||||
ENV NEXTCLOUD_VERSION 32.0.3
|
||||
|
||||
RUN set -ex; \
|
||||
fetchDeps=" \
|
||||
gnupg \
|
||||
dirmngr \
|
||||
"; \
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends $fetchDeps; \
|
||||
\
|
||||
curl -fsSL -o nextcloud.tar.bz2 "https://github.com/nextcloud-releases/server/releases/download/v32.0.3/nextcloud-32.0.3.tar.bz2"; \
|
||||
curl -fsSL -o nextcloud.tar.bz2.asc "https://github.com/nextcloud-releases/server/releases/download/v32.0.3/nextcloud-32.0.3.tar.bz2.asc"; \
|
||||
export GNUPGHOME="$(mktemp -d)"; \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
tar -xjf nextcloud.tar.bz2 -C /usr/src/; \
|
||||
gpgconf --kill all; \
|
||||
rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \
|
||||
mkdir -p /usr/src/nextcloud/data; \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps; \
|
||||
chmod +x /usr/src/nextcloud/occ; \
|
||||
\
|
||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
|
||||
apt-get dist-clean
|
||||
|
||||
ENV NEXTCLOUD_VERSION=32.0.3
|
||||
COPY --from=usr-src /usr/src/ /usr/src/
|
||||
COPY *.sh upgrade.exclude /
|
||||
COPY config/* /usr/src/nextcloud/config/
|
||||
|
||||
|
||||
@ -1,4 +1,21 @@
|
||||
# DO NOT EDIT: created by update.sh from Dockerfile-alpine.template
|
||||
# This uses the same one as debian in order to leverage build cache
|
||||
FROM php:8.3-fpm-trixie AS usr-src
|
||||
RUN --mount=type=cache,sharing=locked,target=/var/lib/apt \
|
||||
--mount=type=cache,sharing=locked,target=/var/cache/apt \
|
||||
apt-get update -y && \
|
||||
apt-get install -y gnupg dirmngr
|
||||
ADD https://github.com/nextcloud-releases/server/releases/download/v32.0.3/nextcloud-32.0.3.tar.bz2 nextcloud.tar.bz2
|
||||
ADD https://github.com/nextcloud-releases/server/releases/download/v32.0.3/nextcloud-32.0.3.tar.bz2.asc nextcloud.tar.bz2.asc
|
||||
RUN tar -xjf nextcloud.tar.bz2 -C /usr/src/ && \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A && \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 && \
|
||||
rm -rf /usr/src/nextcloud/updater && \
|
||||
mkdir -p /usr/src/nextcloud/data && \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps && \
|
||||
chmod +x /usr/src/nextcloud/occ
|
||||
|
||||
FROM php:8.3-fpm-alpine3.22
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
@ -90,9 +107,9 @@ RUN set -ex; \
|
||||
|
||||
# set recommended PHP.ini settings
|
||||
# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache
|
||||
ENV PHP_MEMORY_LIMIT 512M
|
||||
ENV PHP_UPLOAD_LIMIT 512M
|
||||
ENV PHP_OPCACHE_MEMORY_CONSUMPTION 128
|
||||
ENV PHP_MEMORY_LIMIT=512M
|
||||
ENV PHP_UPLOAD_LIMIT=512M
|
||||
ENV PHP_OPCACHE_MEMORY_CONSUMPTION=128
|
||||
RUN { \
|
||||
echo 'opcache.enable=1'; \
|
||||
echo 'opcache.interned_strings_buffer=32'; \
|
||||
@ -129,29 +146,9 @@ RUN { \
|
||||
VOLUME /var/www/html
|
||||
|
||||
|
||||
ENV NEXTCLOUD_VERSION 32.0.3
|
||||
|
||||
RUN set -ex; \
|
||||
apk add --no-cache --virtual .fetch-deps \
|
||||
bzip2 \
|
||||
gnupg \
|
||||
; \
|
||||
\
|
||||
curl -fsSL -o nextcloud.tar.bz2 "https://github.com/nextcloud-releases/server/releases/download/v32.0.3/nextcloud-32.0.3.tar.bz2"; \
|
||||
curl -fsSL -o nextcloud.tar.bz2.asc "https://github.com/nextcloud-releases/server/releases/download/v32.0.3/nextcloud-32.0.3.tar.bz2.asc"; \
|
||||
export GNUPGHOME="$(mktemp -d)"; \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
tar -xjf nextcloud.tar.bz2 -C /usr/src/; \
|
||||
gpgconf --kill all; \
|
||||
rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \
|
||||
mkdir -p /usr/src/nextcloud/data; \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps; \
|
||||
chmod +x /usr/src/nextcloud/occ; \
|
||||
apk del --no-network .fetch-deps
|
||||
ENV NEXTCLOUD_VERSION=32.0.3
|
||||
|
||||
COPY --from=usr-src /usr/src/ /usr/src/
|
||||
COPY *.sh upgrade.exclude /
|
||||
COPY config/* /usr/src/nextcloud/config/
|
||||
|
||||
|
||||
@ -1,4 +1,20 @@
|
||||
# DO NOT EDIT: created by update.sh from Dockerfile-debian.template
|
||||
FROM php:8.3-fpm-trixie AS usr-src
|
||||
RUN --mount=type=cache,sharing=locked,target=/var/lib/apt \
|
||||
--mount=type=cache,sharing=locked,target=/var/cache/apt \
|
||||
apt-get update -y && \
|
||||
apt-get install -y gnupg dirmngr
|
||||
ADD https://github.com/nextcloud-releases/server/releases/download/v32.0.3/nextcloud-32.0.3.tar.bz2 nextcloud.tar.bz2
|
||||
ADD https://github.com/nextcloud-releases/server/releases/download/v32.0.3/nextcloud-32.0.3.tar.bz2.asc nextcloud.tar.bz2.asc
|
||||
RUN tar -xjf nextcloud.tar.bz2 -C /usr/src/ && \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A && \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 && \
|
||||
rm -rf /usr/src/nextcloud/updater && \
|
||||
mkdir -p /usr/src/nextcloud/data && \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps && \
|
||||
chmod +x /usr/src/nextcloud/occ
|
||||
|
||||
FROM php:8.3-fpm-trixie
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
@ -20,10 +36,12 @@ RUN set -ex; \
|
||||
|
||||
# install the PHP extensions we need
|
||||
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
||||
ENV PHP_MEMORY_LIMIT 512M
|
||||
ENV PHP_UPLOAD_LIMIT 512M
|
||||
ENV PHP_OPCACHE_MEMORY_CONSUMPTION 128
|
||||
RUN set -ex; \
|
||||
ENV PHP_MEMORY_LIMIT=512M \
|
||||
PHP_UPLOAD_LIMIT=512M \
|
||||
PHP_OPCACHE_MEMORY_CONSUMPTION=128
|
||||
RUN --mount=type=cache,sharing=locked,target=/var/lib/apt \
|
||||
--mount=type=cache,sharing=locked,target=/var/cache/apt \
|
||||
set -ex; \
|
||||
\
|
||||
savedAptMark="$(apt-mark showmanual)"; \
|
||||
\
|
||||
@ -136,33 +154,8 @@ RUN { \
|
||||
VOLUME /var/www/html
|
||||
|
||||
|
||||
ENV NEXTCLOUD_VERSION 32.0.3
|
||||
|
||||
RUN set -ex; \
|
||||
fetchDeps=" \
|
||||
gnupg \
|
||||
dirmngr \
|
||||
"; \
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends $fetchDeps; \
|
||||
\
|
||||
curl -fsSL -o nextcloud.tar.bz2 "https://github.com/nextcloud-releases/server/releases/download/v32.0.3/nextcloud-32.0.3.tar.bz2"; \
|
||||
curl -fsSL -o nextcloud.tar.bz2.asc "https://github.com/nextcloud-releases/server/releases/download/v32.0.3/nextcloud-32.0.3.tar.bz2.asc"; \
|
||||
export GNUPGHOME="$(mktemp -d)"; \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
tar -xjf nextcloud.tar.bz2 -C /usr/src/; \
|
||||
gpgconf --kill all; \
|
||||
rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \
|
||||
mkdir -p /usr/src/nextcloud/data; \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps; \
|
||||
chmod +x /usr/src/nextcloud/occ; \
|
||||
\
|
||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
|
||||
apt-get dist-clean
|
||||
|
||||
ENV NEXTCLOUD_VERSION=32.0.3
|
||||
COPY --from=usr-src /usr/src/ /usr/src/
|
||||
COPY *.sh upgrade.exclude /
|
||||
COPY config/* /usr/src/nextcloud/config/
|
||||
|
||||
|
||||
@ -1,3 +1,20 @@
|
||||
# This uses the same one as debian in order to leverage build cache
|
||||
FROM php:%%PHP_VERSION%%-fpm-%%DEBIAN_VERSION%% AS usr-src
|
||||
RUN --mount=type=cache,sharing=locked,target=/var/lib/apt \
|
||||
--mount=type=cache,sharing=locked,target=/var/cache/apt \
|
||||
apt-get update -y && \
|
||||
apt-get install -y gnupg dirmngr
|
||||
ADD %%DOWNLOAD_URL%% nextcloud.tar.bz2
|
||||
ADD %%DOWNLOAD_URL_ASC%% nextcloud.tar.bz2.asc
|
||||
RUN tar -xjf nextcloud.tar.bz2 -C /usr/src/ && \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A && \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 && \
|
||||
rm -rf /usr/src/nextcloud/updater && \
|
||||
mkdir -p /usr/src/nextcloud/data && \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps && \
|
||||
chmod +x /usr/src/nextcloud/occ
|
||||
|
||||
FROM php:%%PHP_VERSION%%-%%VARIANT%%%%ALPINE_VERSION%%
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
@ -89,9 +106,9 @@ RUN set -ex; \
|
||||
|
||||
# set recommended PHP.ini settings
|
||||
# see https://docs.nextcloud.com/server/latest/admin_manual/installation/server_tuning.html#enable-php-opcache
|
||||
ENV PHP_MEMORY_LIMIT 512M
|
||||
ENV PHP_UPLOAD_LIMIT 512M
|
||||
ENV PHP_OPCACHE_MEMORY_CONSUMPTION 128
|
||||
ENV PHP_MEMORY_LIMIT=512M
|
||||
ENV PHP_UPLOAD_LIMIT=512M
|
||||
ENV PHP_OPCACHE_MEMORY_CONSUMPTION=128
|
||||
RUN { \
|
||||
echo 'opcache.enable=1'; \
|
||||
echo 'opcache.interned_strings_buffer=32'; \
|
||||
@ -128,29 +145,9 @@ RUN { \
|
||||
VOLUME /var/www/html
|
||||
%%VARIANT_EXTRAS%%
|
||||
|
||||
ENV NEXTCLOUD_VERSION %%VERSION%%
|
||||
|
||||
ADD %%DOWNLOAD_URL%% nextcloud.tar.bz2
|
||||
ADD %%DOWNLOAD_URL_ASC%% nextcloud.tar.bz2.asc
|
||||
RUN set -ex; \
|
||||
apk add --no-cache --virtual .fetch-deps \
|
||||
bzip2 \
|
||||
gnupg \
|
||||
; \
|
||||
\
|
||||
export GNUPGHOME="$(mktemp -d)"; \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
tar -xjf nextcloud.tar.bz2 -C /usr/src/; \
|
||||
gpgconf --kill all; \
|
||||
rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \
|
||||
mkdir -p /usr/src/nextcloud/data; \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps; \
|
||||
chmod +x /usr/src/nextcloud/occ; \
|
||||
apk del --no-network .fetch-deps
|
||||
ENV NEXTCLOUD_VERSION=%%VERSION%%
|
||||
|
||||
COPY --from=usr-src /usr/src/ /usr/src/
|
||||
COPY *.sh upgrade.exclude /
|
||||
COPY config/* /usr/src/nextcloud/config/
|
||||
|
||||
|
||||
@ -1,3 +1,19 @@
|
||||
FROM php:%%PHP_VERSION%%-fpm-%%DEBIAN_VERSION%% AS usr-src
|
||||
RUN --mount=type=cache,sharing=locked,target=/var/lib/apt \
|
||||
--mount=type=cache,sharing=locked,target=/var/cache/apt \
|
||||
apt-get update -y && \
|
||||
apt-get install -y gnupg dirmngr
|
||||
ADD %%DOWNLOAD_URL%% nextcloud.tar.bz2
|
||||
ADD %%DOWNLOAD_URL_ASC%% nextcloud.tar.bz2.asc
|
||||
RUN tar -xjf nextcloud.tar.bz2 -C /usr/src/ && \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A && \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2 && \
|
||||
rm -rf /usr/src/nextcloud/updater && \
|
||||
mkdir -p /usr/src/nextcloud/data && \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps && \
|
||||
chmod +x /usr/src/nextcloud/occ
|
||||
|
||||
FROM php:%%PHP_VERSION%%-%%VARIANT%%-%%DEBIAN_VERSION%%
|
||||
|
||||
# entrypoint.sh and cron.sh dependencies
|
||||
@ -19,10 +35,12 @@ RUN set -ex; \
|
||||
|
||||
# install the PHP extensions we need
|
||||
# see https://docs.nextcloud.com/server/stable/admin_manual/installation/source_installation.html
|
||||
ENV PHP_MEMORY_LIMIT 512M
|
||||
ENV PHP_UPLOAD_LIMIT 512M
|
||||
ENV PHP_OPCACHE_MEMORY_CONSUMPTION 128
|
||||
RUN set -ex; \
|
||||
ENV PHP_MEMORY_LIMIT=512M \
|
||||
PHP_UPLOAD_LIMIT=512M \
|
||||
PHP_OPCACHE_MEMORY_CONSUMPTION=128
|
||||
RUN --mount=type=cache,sharing=locked,target=/var/lib/apt \
|
||||
--mount=type=cache,sharing=locked,target=/var/cache/apt \
|
||||
set -ex; \
|
||||
\
|
||||
savedAptMark="$(apt-mark showmanual)"; \
|
||||
\
|
||||
@ -135,32 +153,8 @@ RUN { \
|
||||
VOLUME /var/www/html
|
||||
%%VARIANT_EXTRAS%%
|
||||
|
||||
ENV NEXTCLOUD_VERSION %%VERSION%%
|
||||
ADD %%DOWNLOAD_URL%% nextcloud.tar.bz2
|
||||
ADD %%DOWNLOAD_URL_ASC%% nextcloud.tar.bz2.asc
|
||||
RUN set -ex; \
|
||||
fetchDeps=" \
|
||||
gnupg \
|
||||
dirmngr \
|
||||
"; \
|
||||
apt-get update; \
|
||||
apt-get install -y --no-install-recommends $fetchDeps; \
|
||||
\
|
||||
export GNUPGHOME="$(mktemp -d)"; \
|
||||
# gpg key from https://nextcloud.com/nextcloud.asc
|
||||
gpg --batch --keyserver keyserver.ubuntu.com --recv-keys 28806A878AE423A28372792ED75899B9A724937A; \
|
||||
gpg --batch --verify nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
tar -xjf nextcloud.tar.bz2 -C /usr/src/; \
|
||||
gpgconf --kill all; \
|
||||
rm nextcloud.tar.bz2.asc nextcloud.tar.bz2; \
|
||||
rm -rf "$GNUPGHOME" /usr/src/nextcloud/updater; \
|
||||
mkdir -p /usr/src/nextcloud/data; \
|
||||
mkdir -p /usr/src/nextcloud/custom_apps; \
|
||||
chmod +x /usr/src/nextcloud/occ; \
|
||||
\
|
||||
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
|
||||
apt-get dist-clean
|
||||
|
||||
ENV NEXTCLOUD_VERSION=%%VERSION%%
|
||||
COPY --from=usr-src /usr/src/ /usr/src/
|
||||
COPY *.sh upgrade.exclude /
|
||||
COPY config/* /usr/src/nextcloud/config/
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ declare -A base=(
|
||||
)
|
||||
|
||||
declare -A extras=(
|
||||
[apache]='\nRUN a2enmod headers rewrite remoteip ; \\\n { \\\n echo '\''RemoteIPHeader X-Real-IP'\''; \\\n echo '\''RemoteIPInternalProxy 10.0.0.0/8'\''; \\\n echo '\''RemoteIPInternalProxy 172.16.0.0/12'\''; \\\n echo '\''RemoteIPInternalProxy 192.168.0.0/16'\''; \\\n } > /etc/apache2/conf-available/remoteip.conf; \\\n a2enconf remoteip\n\n# set apache config LimitRequestBody\nENV APACHE_BODY_LIMIT 1073741824\nRUN { \\\n echo '\''LimitRequestBody ${APACHE_BODY_LIMIT}'\''; \\\n } > /etc/apache2/conf-available/apache-limits.conf; \\\n a2enconf apache-limits'
|
||||
[apache]='\nRUN a2enmod headers rewrite remoteip ; \\\n { \\\n echo '\''RemoteIPHeader X-Real-IP'\''; \\\n echo '\''RemoteIPInternalProxy 10.0.0.0/8'\''; \\\n echo '\''RemoteIPInternalProxy 172.16.0.0/12'\''; \\\n echo '\''RemoteIPInternalProxy 192.168.0.0/16'\''; \\\n } > /etc/apache2/conf-available/remoteip.conf; \\\n a2enconf remoteip\n\n# set apache config LimitRequestBody\nENV APACHE_BODY_LIMIT=1073741824\nRUN { \\\n echo '\''LimitRequestBody ${APACHE_BODY_LIMIT}'\''; \\\n } > /etc/apache2/conf-available/apache-limits.conf; \\\n a2enconf apache-limits'
|
||||
[fpm]=''
|
||||
[fpm-alpine]=''
|
||||
)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user