Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 15 additions & 6 deletions 31/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ RUN { \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www

VOLUME /var/www/html
VOLUME /var/www/html/data
VOLUME /var/www/html/config
VOLUME /var/www/html/custom_apps
VOLUME /var/www/html/themes
VOLUME /var/www/tmp

RUN a2enmod headers rewrite remoteip ; \
{ \
Expand Down Expand Up @@ -167,12 +171,17 @@ RUN set -ex; \
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/; \
mkdir /usr/src/nextcloud-base; \
mv -vf /usr/src/nextcloud/config /usr/src/nextcloud/themes /usr/src/nextcloud-base/; \
rm -Rvf /var/www/html; \
mv -vf /usr/src/nextcloud /var/www/html; \
mv -vf /usr/src/nextcloud-base /usr/src/nextcloud; \
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; \
rm -rf "$GNUPGHOME" /var/www/html/updater; \
mkdir -p /var/www/html/data; \
mkdir -p /var/www/html/custom_apps; \
mkdir -p /var/www/html/themes; \
chmod +x /var/www/html/occ; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
apt-get dist-clean
Expand Down
11 changes: 6 additions & 5 deletions 31/apache/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
fi

installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
if [ -f /var/www/html/config/version.php ]; then
# shellcheck disable=SC2016
installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
installed_version="$(php -r 'require "/var/www/html/config/version.php"; echo implode(".", $OC_Version);')"
fi
# shellcheck disable=SC2016
image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')"
image_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"

if version_greater "$installed_version" "$image_version"; then
echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
Expand All @@ -186,13 +186,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
rsync_options="-rlD"
fi

rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
for dir in config data custom_apps themes; do
if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi
done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/

# Install
if [ "$installed_version" = "0.0.0.0" ]; then
Expand Down Expand Up @@ -284,6 +282,9 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
run_path post-upgrade
fi

cp -vf /var/www/html/version.php /var/www/html/config/
chown -c $user:$group /var/www/html/config/version.php

echo "Initializing finished"
fi

Expand Down
21 changes: 15 additions & 6 deletions 31/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ RUN { \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www

VOLUME /var/www/html
VOLUME /var/www/html/data
VOLUME /var/www/html/config
VOLUME /var/www/html/custom_apps
VOLUME /var/www/html/themes
VOLUME /var/www/tmp


ENV NEXTCLOUD_VERSION 31.0.11
Expand All @@ -143,12 +147,17 @@ RUN set -ex; \
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/; \
mkdir /usr/src/nextcloud-base; \
mv -vf /usr/src/nextcloud/config /usr/src/nextcloud/themes /usr/src/nextcloud-base/; \
rm -Rvf /var/www/html; \
mv -vf /usr/src/nextcloud /var/www/html; \
mv -vf /usr/src/nextcloud-base /usr/src/nextcloud; \
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; \
rm -rf "$GNUPGHOME" /var/www/html/updater; \
mkdir -p /var/www/html/data; \
mkdir -p /var/www/html/custom_apps; \
mkdir -p /var/www/html/themes; \
chmod +x /var/www/html/occ; \
apk del --no-network .fetch-deps

COPY *.sh upgrade.exclude /
Expand Down
11 changes: 6 additions & 5 deletions 31/fpm-alpine/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
fi

installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
if [ -f /var/www/html/config/version.php ]; then
# shellcheck disable=SC2016
installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
installed_version="$(php -r 'require "/var/www/html/config/version.php"; echo implode(".", $OC_Version);')"
fi
# shellcheck disable=SC2016
image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')"
image_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"

if version_greater "$installed_version" "$image_version"; then
echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
Expand All @@ -186,13 +186,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
rsync_options="-rlD"
fi

rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
for dir in config data custom_apps themes; do
if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi
done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/

# Install
if [ "$installed_version" = "0.0.0.0" ]; then
Expand Down Expand Up @@ -284,6 +282,9 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
run_path post-upgrade
fi

cp -vf /var/www/html/version.php /var/www/html/config/
chown -c $user:$group /var/www/html/config/version.php

echo "Initializing finished"
fi

Expand Down
21 changes: 15 additions & 6 deletions 31/fpm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ RUN { \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www

VOLUME /var/www/html
VOLUME /var/www/html/data
VOLUME /var/www/html/config
VOLUME /var/www/html/custom_apps
VOLUME /var/www/html/themes
VOLUME /var/www/tmp


ENV NEXTCLOUD_VERSION 31.0.11
Expand All @@ -152,12 +156,17 @@ RUN set -ex; \
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/; \
mkdir /usr/src/nextcloud-base; \
mv -vf /usr/src/nextcloud/config /usr/src/nextcloud/themes /usr/src/nextcloud-base/; \
rm -Rvf /var/www/html; \
mv -vf /usr/src/nextcloud /var/www/html; \
mv -vf /usr/src/nextcloud-base /usr/src/nextcloud; \
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; \
rm -rf "$GNUPGHOME" /var/www/html/updater; \
mkdir -p /var/www/html/data; \
mkdir -p /var/www/html/custom_apps; \
mkdir -p /var/www/html/themes; \
chmod +x /var/www/html/occ; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
apt-get dist-clean
Expand Down
11 changes: 6 additions & 5 deletions 31/fpm/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
fi

installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
if [ -f /var/www/html/config/version.php ]; then
# shellcheck disable=SC2016
installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
installed_version="$(php -r 'require "/var/www/html/config/version.php"; echo implode(".", $OC_Version);')"
fi
# shellcheck disable=SC2016
image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')"
image_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"

if version_greater "$installed_version" "$image_version"; then
echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
Expand All @@ -186,13 +186,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
rsync_options="-rlD"
fi

rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
for dir in config data custom_apps themes; do
if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi
done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/

# Install
if [ "$installed_version" = "0.0.0.0" ]; then
Expand Down Expand Up @@ -284,6 +282,9 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
run_path post-upgrade
fi

cp -vf /var/www/html/version.php /var/www/html/config/
chown -c $user:$group /var/www/html/config/version.php

echo "Initializing finished"
fi

Expand Down
21 changes: 15 additions & 6 deletions 32/apache/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,11 @@ RUN { \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www

VOLUME /var/www/html
VOLUME /var/www/html/data
VOLUME /var/www/html/config
VOLUME /var/www/html/custom_apps
VOLUME /var/www/html/themes
VOLUME /var/www/tmp

RUN a2enmod headers rewrite remoteip ; \
{ \
Expand Down Expand Up @@ -167,12 +171,17 @@ RUN set -ex; \
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/; \
mkdir /usr/src/nextcloud-base; \
mv -vf /usr/src/nextcloud/config /usr/src/nextcloud/themes /usr/src/nextcloud-base/; \
rm -Rvf /var/www/html; \
mv -vf /usr/src/nextcloud /var/www/html; \
mv -vf /usr/src/nextcloud-base /usr/src/nextcloud; \
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; \
rm -rf "$GNUPGHOME" /var/www/html/updater; \
mkdir -p /var/www/html/data; \
mkdir -p /var/www/html/custom_apps; \
mkdir -p /var/www/html/themes; \
chmod +x /var/www/html/occ; \
\
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \
apt-get dist-clean
Expand Down
11 changes: 6 additions & 5 deletions 32/apache/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
fi

installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
if [ -f /var/www/html/config/version.php ]; then
# shellcheck disable=SC2016
installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
installed_version="$(php -r 'require "/var/www/html/config/version.php"; echo implode(".", $OC_Version);')"
fi
# shellcheck disable=SC2016
image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')"
image_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"

if version_greater "$installed_version" "$image_version"; then
echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
Expand All @@ -186,13 +186,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
rsync_options="-rlD"
fi

rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
for dir in config data custom_apps themes; do
if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi
done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/

# Install
if [ "$installed_version" = "0.0.0.0" ]; then
Expand Down Expand Up @@ -284,6 +282,9 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
run_path post-upgrade
fi

cp -vf /var/www/html/version.php /var/www/html/config/
chown -c $user:$group /var/www/html/config/version.php

echo "Initializing finished"
fi

Expand Down
21 changes: 15 additions & 6 deletions 32/fpm-alpine/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,11 @@ RUN { \
chown -R www-data:root /var/www; \
chmod -R g=u /var/www

VOLUME /var/www/html
VOLUME /var/www/html/data
VOLUME /var/www/html/config
VOLUME /var/www/html/custom_apps
VOLUME /var/www/html/themes
VOLUME /var/www/tmp


ENV NEXTCLOUD_VERSION 32.0.2
Expand All @@ -143,12 +147,17 @@ RUN set -ex; \
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/; \
mkdir /usr/src/nextcloud-base; \
mv -vf /usr/src/nextcloud/config /usr/src/nextcloud/themes /usr/src/nextcloud-base/; \
rm -Rvf /var/www/html; \
mv -vf /usr/src/nextcloud /var/www/html; \
mv -vf /usr/src/nextcloud-base /usr/src/nextcloud; \
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; \
rm -rf "$GNUPGHOME" /var/www/html/updater; \
mkdir -p /var/www/html/data; \
mkdir -p /var/www/html/custom_apps; \
mkdir -p /var/www/html/themes; \
chmod +x /var/www/html/occ; \
apk del --no-network .fetch-deps

COPY *.sh upgrade.exclude /
Expand Down
11 changes: 6 additions & 5 deletions 32/fpm-alpine/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -157,12 +157,12 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
fi

installed_version="0.0.0.0"
if [ -f /var/www/html/version.php ]; then
if [ -f /var/www/html/config/version.php ]; then
# shellcheck disable=SC2016
installed_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"
installed_version="$(php -r 'require "/var/www/html/config/version.php"; echo implode(".", $OC_Version);')"
fi
# shellcheck disable=SC2016
image_version="$(php -r 'require "/usr/src/nextcloud/version.php"; echo implode(".", $OC_Version);')"
image_version="$(php -r 'require "/var/www/html/version.php"; echo implode(".", $OC_Version);')"

if version_greater "$installed_version" "$image_version"; then
echo "Can't start Nextcloud because the version of the data ($installed_version) is higher than the docker image version ($image_version) and downgrading is not supported. Are you sure you have pulled the newest image version?"
Expand All @@ -186,13 +186,11 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
rsync_options="-rlD"
fi

rsync $rsync_options --delete --exclude-from=/upgrade.exclude /usr/src/nextcloud/ /var/www/html/
for dir in config data custom_apps themes; do
if [ ! -d "/var/www/html/$dir" ] || directory_empty "/var/www/html/$dir"; then
rsync $rsync_options --include "/$dir/" --exclude '/*' /usr/src/nextcloud/ /var/www/html/
fi
done
rsync $rsync_options --include '/version.php' --exclude '/*' /usr/src/nextcloud/ /var/www/html/

# Install
if [ "$installed_version" = "0.0.0.0" ]; then
Expand Down Expand Up @@ -284,6 +282,9 @@ if expr "$1" : "apache" 1>/dev/null || [ "$1" = "php-fpm" ] || [ "${NEXTCLOUD_UP
run_path post-upgrade
fi

cp -vf /var/www/html/version.php /var/www/html/config/
chown -c $user:$group /var/www/html/config/version.php

echo "Initializing finished"
fi

Expand Down
Loading