Skip to content

Update docker-library images #3378

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 28, 2017

Conversation

tianon
Copy link
Member

@tianon tianon commented Aug 28, 2017

- `buildpack-deps`: add `dpkg-dev` (docker-library/buildpack-deps#65)
- `nextcloud`: remove EOL 10.0 (nextcloud/docker#146), update permissions for non-root usage (nextcloud/docker#131)
- `ruby`: rubygems 2.6.13
@tianon
Copy link
Member Author

tianon commented Aug 28, 2017

Diff:
diff --git a/_bashbrew-arches b/_bashbrew-arches
index 04076fa..6924c63 100644
--- a/_bashbrew-arches
+++ b/_bashbrew-arches
@@ -163,20 +163,6 @@ buildpack-deps:zesty-scm @ arm64v8
 buildpack-deps:zesty-scm @ i386
 buildpack-deps:zesty-scm @ ppc64le
 buildpack-deps:zesty-scm @ s390x
-nextcloud:10 @ amd64
-nextcloud:10 @ arm32v5
-nextcloud:10 @ arm32v7
-nextcloud:10 @ arm64v8
-nextcloud:10 @ i386
-nextcloud:10 @ ppc64le
-nextcloud:10 @ s390x
-nextcloud:10-fpm @ amd64
-nextcloud:10-fpm @ arm32v5
-nextcloud:10-fpm @ arm32v7
-nextcloud:10-fpm @ arm64v8
-nextcloud:10-fpm @ i386
-nextcloud:10-fpm @ ppc64le
-nextcloud:10-fpm @ s390x
 nextcloud:11 @ amd64
 nextcloud:11 @ arm32v5
 nextcloud:11 @ arm32v7
diff --git a/_bashbrew-list b/_bashbrew-list
index fd322c0..a25ac7e 100644
--- a/_bashbrew-list
+++ b/_bashbrew-list
@@ -28,15 +28,6 @@ buildpack-deps:xenial-scm
 buildpack-deps:zesty
 buildpack-deps:zesty-curl
 buildpack-deps:zesty-scm
-nextcloud:10
-nextcloud:10-apache
-nextcloud:10-fpm
-nextcloud:10.0
-nextcloud:10.0-apache
-nextcloud:10.0-fpm
-nextcloud:10.0.6
-nextcloud:10.0.6-apache
-nextcloud:10.0.6-fpm
 nextcloud:11
 nextcloud:11-apache
 nextcloud:11-fpm
diff --git a/buildpack-deps_artful/Dockerfile b/buildpack-deps_artful/Dockerfile
index 5dc49c4..acca73b 100644
--- a/buildpack-deps_artful/Dockerfile
+++ b/buildpack-deps_artful/Dockerfile
@@ -6,6 +6,7 @@ RUN set -ex; \
 		autoconf \
 		automake \
 		bzip2 \
+		dpkg-dev \
 		file \
 		g++ \
 		gcc \
diff --git a/buildpack-deps_buster/Dockerfile b/buildpack-deps_buster/Dockerfile
index c90551e..8c4a75b 100644
--- a/buildpack-deps_buster/Dockerfile
+++ b/buildpack-deps_buster/Dockerfile
@@ -6,6 +6,7 @@ RUN set -ex; \
 		autoconf \
 		automake \
 		bzip2 \
+		dpkg-dev \
 		file \
 		g++ \
 		gcc \
diff --git a/buildpack-deps_jessie/Dockerfile b/buildpack-deps_jessie/Dockerfile
index 8109d9f..42df0b2 100644
--- a/buildpack-deps_jessie/Dockerfile
+++ b/buildpack-deps_jessie/Dockerfile
@@ -6,6 +6,7 @@ RUN set -ex; \
 		autoconf \
 		automake \
 		bzip2 \
+		dpkg-dev \
 		file \
 		g++ \
 		gcc \
diff --git a/buildpack-deps_latest/Dockerfile b/buildpack-deps_latest/Dockerfile
index c0a4395..a3563aa 100644
--- a/buildpack-deps_latest/Dockerfile
+++ b/buildpack-deps_latest/Dockerfile
@@ -6,6 +6,7 @@ RUN set -ex; \
 		autoconf \
 		automake \
 		bzip2 \
+		dpkg-dev \
 		file \
 		g++ \
 		gcc \
diff --git a/buildpack-deps_sid/Dockerfile b/buildpack-deps_sid/Dockerfile
index b0c9e6e..c08c989 100644
--- a/buildpack-deps_sid/Dockerfile
+++ b/buildpack-deps_sid/Dockerfile
@@ -6,6 +6,7 @@ RUN set -ex; \
 		autoconf \
 		automake \
 		bzip2 \
+		dpkg-dev \
 		file \
 		g++ \
 		gcc \
diff --git a/buildpack-deps_trusty/Dockerfile b/buildpack-deps_trusty/Dockerfile
index f3b4ce1..36608e6 100644
--- a/buildpack-deps_trusty/Dockerfile
+++ b/buildpack-deps_trusty/Dockerfile
@@ -6,6 +6,7 @@ RUN set -ex; \
 		autoconf \
 		automake \
 		bzip2 \
+		dpkg-dev \
 		file \
 		g++ \
 		gcc \
diff --git a/buildpack-deps_wheezy/Dockerfile b/buildpack-deps_wheezy/Dockerfile
index a51445b..8e9c7f3 100644
--- a/buildpack-deps_wheezy/Dockerfile
+++ b/buildpack-deps_wheezy/Dockerfile
@@ -6,6 +6,7 @@ RUN set -ex; \
 		autoconf \
 		automake \
 		bzip2 \
+		dpkg-dev \
 		file \
 		g++ \
 		gcc \
diff --git a/buildpack-deps_xenial/Dockerfile b/buildpack-deps_xenial/Dockerfile
index 8e65005..4c9142e 100644
--- a/buildpack-deps_xenial/Dockerfile
+++ b/buildpack-deps_xenial/Dockerfile
@@ -6,6 +6,7 @@ RUN set -ex; \
 		autoconf \
 		automake \
 		bzip2 \
+		dpkg-dev \
 		file \
 		g++ \
 		gcc \
diff --git a/buildpack-deps_zesty/Dockerfile b/buildpack-deps_zesty/Dockerfile
index 16d80d0..bd986dc 100644
--- a/buildpack-deps_zesty/Dockerfile
+++ b/buildpack-deps_zesty/Dockerfile
@@ -6,6 +6,7 @@ RUN set -ex; \
 		autoconf \
 		automake \
 		bzip2 \
+		dpkg-dev \
 		file \
 		g++ \
 		gcc \
diff --git a/nextcloud_10-fpm/Dockerfile b/nextcloud_10-fpm/Dockerfile
deleted file mode 100644
index cc1fe76..0000000
diff --git a/nextcloud_10-fpm/config/apcu.config.php b/nextcloud_10-fpm/config/apcu.config.php
deleted file mode 100644
index 69fed87..0000000
diff --git a/nextcloud_10-fpm/config/apps.config.php b/nextcloud_10-fpm/config/apps.config.php
deleted file mode 100644
index a4bed83..0000000
diff --git a/nextcloud_10-fpm/docker-entrypoint.sh b/nextcloud_10-fpm/docker-entrypoint.sh
deleted file mode 100755
index f073581..0000000
diff --git a/nextcloud_10/Dockerfile b/nextcloud_10/Dockerfile
deleted file mode 100644
index 1f38d8e..0000000
diff --git a/nextcloud_10/config/apcu.config.php b/nextcloud_10/config/apcu.config.php
deleted file mode 100644
index 69fed87..0000000
diff --git a/nextcloud_10/config/apps.config.php b/nextcloud_10/config/apps.config.php
deleted file mode 100644
index a4bed83..0000000
diff --git a/nextcloud_10/docker-entrypoint.sh b/nextcloud_10/docker-entrypoint.sh
deleted file mode 100755
index f073581..0000000
diff --git a/nextcloud_11-fpm/Dockerfile b/nextcloud_11-fpm/Dockerfile
index dd0d689..6c75948 100644
--- a/nextcloud_11-fpm/Dockerfile
+++ b/nextcloud_11-fpm/Dockerfile
@@ -41,9 +41,10 @@ RUN set -ex \
  && docker-php-ext-enable apcu redis memcached
 
 ENV NEXTCLOUD_VERSION 11.0.4
-VOLUME /var/www/html
 
-COPY config/* /usr/src/nextcloud/config/
+RUN chown -R www-data:root /var/www/html && \
+    chmod -R g=u /var/www/html
+VOLUME /var/www/html
 
 RUN curl -fsSL -o nextcloud.tar.bz2 \
     "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2" \
@@ -57,19 +58,12 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \
  && tar -xjf nextcloud.tar.bz2 -C /usr/src/ \
  && rm nextcloud.tar.bz2 \
  && rm -rf /usr/src/nextcloud/updater \
- # https://docs.nextcloud.com/server/11/admin_manual/installation/installation_wizard.html#setting-strong-directory-permissions
  && mkdir -p /usr/src/nextcloud/data \
  && mkdir -p /usr/src/nextcloud/custom_apps \
- && find /usr/src/nextcloud/ -type f -print0 | xargs -0 chmod 0640 \
- && find /usr/src/nextcloud/ -type d -print0 | xargs -0 chmod 0750 \
- && chown -R root:www-data /usr/src/nextcloud/ \
- && chown -R www-data:www-data /usr/src/nextcloud/custom_apps/ \
- && chown -R www-data:www-data /usr/src/nextcloud/config/ \
- && chown -R www-data:www-data /usr/src/nextcloud/data/ \
- && chown -R www-data:www-data /usr/src/nextcloud/themes/ \
  && chmod +x /usr/src/nextcloud/occ
 
 COPY docker-entrypoint.sh /entrypoint.sh
+COPY config/* /usr/src/nextcloud/config/
 
 ENTRYPOINT ["/entrypoint.sh"]
 CMD ["php-fpm"]
diff --git a/nextcloud_11-fpm/docker-entrypoint.sh b/nextcloud_11-fpm/docker-entrypoint.sh
index f073581..9298bb4 100755
--- a/nextcloud_11-fpm/docker-entrypoint.sh
+++ b/nextcloud_11-fpm/docker-entrypoint.sh
@@ -11,6 +11,13 @@ function directory_empty() {
     [ -n "$(find "$1"/ -prune -empty)" ]
 }
 
+function run_as() {
+  if [[ $EUID -eq 0 ]]; then
+    su - www-data -s /bin/bash -c "$1"
+  else
+    bash -c "$1"
+  fi
+}
 
 installed_version="0.0.0~unknown"
 if [ -f /var/www/html/version.php ]; then
@@ -25,28 +32,25 @@ fi
 
 if version_greater "$image_version" "$installed_version"; then
     if [ "$installed_version" != "0.0.0~unknown" ]; then
-        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before
+        run_as 'php /var/www/html/occ app:list' > /tmp/list_before
+    fi
+    if [[ $EUID -eq 0 ]]; then
+      rsync_options="-rlDog --chown www-data:root"
+    else
+      rsync_options="-rlD"
     fi
-    rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
-    
-    for dir in config data themes; do
+    rsync $rsync_options --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /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
-            cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
+            rsync $rsync_options --include /"$dir"/ --exclude '/*' /usr/src/nextcloud/ /var/www/html/
         fi
     done
 
-    if [ ! -d /var/www/html/custom_apps ] && [ ! -f /var/www/html/config/apps.config.php ]; then
-        cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
-    fi
-
-    if [ ! -d /var/www/html/custom_apps ] || directory_empty /var/www/html/custom_apps; then
-        cp -arT /usr/src/nextcloud/custom_apps /var/www/html/custom_apps
-    fi
-
     if [ "$installed_version" != "0.0.0~unknown" ]; then
-        su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
+        run_as 'php /var/www/html/occ upgrade --no-app-disable'
 
-        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_after
+        run_as 'php /var/www/html/occ app:list' > /tmp/list_after
         echo "The following apps have beed disabled:"
         diff <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_before) <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_after) | grep '<' | cut -d- -f2 | cut -d: -f1
         rm -f /tmp/list_before /tmp/list_after
diff --git a/nextcloud_11/Dockerfile b/nextcloud_11/Dockerfile
index 851d24f..ab9c68b 100644
--- a/nextcloud_11/Dockerfile
+++ b/nextcloud_11/Dockerfile
@@ -43,9 +43,10 @@ RUN set -ex \
 RUN a2enmod rewrite
 
 ENV NEXTCLOUD_VERSION 11.0.4
-VOLUME /var/www/html
 
-COPY config/* /usr/src/nextcloud/config/
+RUN chown -R www-data:root /var/www/html && \
+    chmod -R g=u /var/www/html
+VOLUME /var/www/html
 
 RUN curl -fsSL -o nextcloud.tar.bz2 \
     "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2" \
@@ -59,19 +60,12 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \
  && tar -xjf nextcloud.tar.bz2 -C /usr/src/ \
  && rm nextcloud.tar.bz2 \
  && rm -rf /usr/src/nextcloud/updater \
- # https://docs.nextcloud.com/server/11/admin_manual/installation/installation_wizard.html#setting-strong-directory-permissions
  && mkdir -p /usr/src/nextcloud/data \
  && mkdir -p /usr/src/nextcloud/custom_apps \
- && find /usr/src/nextcloud/ -type f -print0 | xargs -0 chmod 0640 \
- && find /usr/src/nextcloud/ -type d -print0 | xargs -0 chmod 0750 \
- && chown -R root:www-data /usr/src/nextcloud/ \
- && chown -R www-data:www-data /usr/src/nextcloud/custom_apps/ \
- && chown -R www-data:www-data /usr/src/nextcloud/config/ \
- && chown -R www-data:www-data /usr/src/nextcloud/data/ \
- && chown -R www-data:www-data /usr/src/nextcloud/themes/ \
  && chmod +x /usr/src/nextcloud/occ
 
 COPY docker-entrypoint.sh /entrypoint.sh
+COPY config/* /usr/src/nextcloud/config/
 
 ENTRYPOINT ["/entrypoint.sh"]
 CMD ["apache2-foreground"]
diff --git a/nextcloud_11/docker-entrypoint.sh b/nextcloud_11/docker-entrypoint.sh
index f073581..9298bb4 100755
--- a/nextcloud_11/docker-entrypoint.sh
+++ b/nextcloud_11/docker-entrypoint.sh
@@ -11,6 +11,13 @@ function directory_empty() {
     [ -n "$(find "$1"/ -prune -empty)" ]
 }
 
+function run_as() {
+  if [[ $EUID -eq 0 ]]; then
+    su - www-data -s /bin/bash -c "$1"
+  else
+    bash -c "$1"
+  fi
+}
 
 installed_version="0.0.0~unknown"
 if [ -f /var/www/html/version.php ]; then
@@ -25,28 +32,25 @@ fi
 
 if version_greater "$image_version" "$installed_version"; then
     if [ "$installed_version" != "0.0.0~unknown" ]; then
-        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before
+        run_as 'php /var/www/html/occ app:list' > /tmp/list_before
+    fi
+    if [[ $EUID -eq 0 ]]; then
+      rsync_options="-rlDog --chown www-data:root"
+    else
+      rsync_options="-rlD"
     fi
-    rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
-    
-    for dir in config data themes; do
+    rsync $rsync_options --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /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
-            cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
+            rsync $rsync_options --include /"$dir"/ --exclude '/*' /usr/src/nextcloud/ /var/www/html/
         fi
     done
 
-    if [ ! -d /var/www/html/custom_apps ] && [ ! -f /var/www/html/config/apps.config.php ]; then
-        cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
-    fi
-
-    if [ ! -d /var/www/html/custom_apps ] || directory_empty /var/www/html/custom_apps; then
-        cp -arT /usr/src/nextcloud/custom_apps /var/www/html/custom_apps
-    fi
-
     if [ "$installed_version" != "0.0.0~unknown" ]; then
-        su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
+        run_as 'php /var/www/html/occ upgrade --no-app-disable'
 
-        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_after
+        run_as 'php /var/www/html/occ app:list' > /tmp/list_after
         echo "The following apps have beed disabled:"
         diff <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_before) <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_after) | grep '<' | cut -d- -f2 | cut -d: -f1
         rm -f /tmp/list_before /tmp/list_after
diff --git a/nextcloud_fpm/Dockerfile b/nextcloud_fpm/Dockerfile
index 02ef6f6..e0c75fd 100644
--- a/nextcloud_fpm/Dockerfile
+++ b/nextcloud_fpm/Dockerfile
@@ -41,9 +41,10 @@ RUN set -ex \
  && docker-php-ext-enable apcu redis memcached
 
 ENV NEXTCLOUD_VERSION 12.0.2
-VOLUME /var/www/html
 
-COPY config/* /usr/src/nextcloud/config/
+RUN chown -R www-data:root /var/www/html && \
+    chmod -R g=u /var/www/html
+VOLUME /var/www/html
 
 RUN curl -fsSL -o nextcloud.tar.bz2 \
     "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2" \
@@ -57,19 +58,12 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \
  && tar -xjf nextcloud.tar.bz2 -C /usr/src/ \
  && rm nextcloud.tar.bz2 \
  && rm -rf /usr/src/nextcloud/updater \
- # https://docs.nextcloud.com/server/11/admin_manual/installation/installation_wizard.html#setting-strong-directory-permissions
  && mkdir -p /usr/src/nextcloud/data \
  && mkdir -p /usr/src/nextcloud/custom_apps \
- && find /usr/src/nextcloud/ -type f -print0 | xargs -0 chmod 0640 \
- && find /usr/src/nextcloud/ -type d -print0 | xargs -0 chmod 0750 \
- && chown -R root:www-data /usr/src/nextcloud/ \
- && chown -R www-data:www-data /usr/src/nextcloud/custom_apps/ \
- && chown -R www-data:www-data /usr/src/nextcloud/config/ \
- && chown -R www-data:www-data /usr/src/nextcloud/data/ \
- && chown -R www-data:www-data /usr/src/nextcloud/themes/ \
  && chmod +x /usr/src/nextcloud/occ
 
 COPY docker-entrypoint.sh /entrypoint.sh
+COPY config/* /usr/src/nextcloud/config/
 
 ENTRYPOINT ["/entrypoint.sh"]
 CMD ["php-fpm"]
diff --git a/nextcloud_fpm/docker-entrypoint.sh b/nextcloud_fpm/docker-entrypoint.sh
index f073581..9298bb4 100755
--- a/nextcloud_fpm/docker-entrypoint.sh
+++ b/nextcloud_fpm/docker-entrypoint.sh
@@ -11,6 +11,13 @@ function directory_empty() {
     [ -n "$(find "$1"/ -prune -empty)" ]
 }
 
+function run_as() {
+  if [[ $EUID -eq 0 ]]; then
+    su - www-data -s /bin/bash -c "$1"
+  else
+    bash -c "$1"
+  fi
+}
 
 installed_version="0.0.0~unknown"
 if [ -f /var/www/html/version.php ]; then
@@ -25,28 +32,25 @@ fi
 
 if version_greater "$image_version" "$installed_version"; then
     if [ "$installed_version" != "0.0.0~unknown" ]; then
-        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before
+        run_as 'php /var/www/html/occ app:list' > /tmp/list_before
+    fi
+    if [[ $EUID -eq 0 ]]; then
+      rsync_options="-rlDog --chown www-data:root"
+    else
+      rsync_options="-rlD"
     fi
-    rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
-    
-    for dir in config data themes; do
+    rsync $rsync_options --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /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
-            cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
+            rsync $rsync_options --include /"$dir"/ --exclude '/*' /usr/src/nextcloud/ /var/www/html/
         fi
     done
 
-    if [ ! -d /var/www/html/custom_apps ] && [ ! -f /var/www/html/config/apps.config.php ]; then
-        cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
-    fi
-
-    if [ ! -d /var/www/html/custom_apps ] || directory_empty /var/www/html/custom_apps; then
-        cp -arT /usr/src/nextcloud/custom_apps /var/www/html/custom_apps
-    fi
-
     if [ "$installed_version" != "0.0.0~unknown" ]; then
-        su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
+        run_as 'php /var/www/html/occ upgrade --no-app-disable'
 
-        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_after
+        run_as 'php /var/www/html/occ app:list' > /tmp/list_after
         echo "The following apps have beed disabled:"
         diff <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_before) <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_after) | grep '<' | cut -d- -f2 | cut -d: -f1
         rm -f /tmp/list_before /tmp/list_after
diff --git a/nextcloud_latest/Dockerfile b/nextcloud_latest/Dockerfile
index d742d9c..9032b0a 100644
--- a/nextcloud_latest/Dockerfile
+++ b/nextcloud_latest/Dockerfile
@@ -43,9 +43,10 @@ RUN set -ex \
 RUN a2enmod rewrite
 
 ENV NEXTCLOUD_VERSION 12.0.2
-VOLUME /var/www/html
 
-COPY config/* /usr/src/nextcloud/config/
+RUN chown -R www-data:root /var/www/html && \
+    chmod -R g=u /var/www/html
+VOLUME /var/www/html
 
 RUN curl -fsSL -o nextcloud.tar.bz2 \
     "https://download.nextcloud.com/server/releases/nextcloud-${NEXTCLOUD_VERSION}.tar.bz2" \
@@ -59,19 +60,12 @@ RUN curl -fsSL -o nextcloud.tar.bz2 \
  && tar -xjf nextcloud.tar.bz2 -C /usr/src/ \
  && rm nextcloud.tar.bz2 \
  && rm -rf /usr/src/nextcloud/updater \
- # https://docs.nextcloud.com/server/11/admin_manual/installation/installation_wizard.html#setting-strong-directory-permissions
  && mkdir -p /usr/src/nextcloud/data \
  && mkdir -p /usr/src/nextcloud/custom_apps \
- && find /usr/src/nextcloud/ -type f -print0 | xargs -0 chmod 0640 \
- && find /usr/src/nextcloud/ -type d -print0 | xargs -0 chmod 0750 \
- && chown -R root:www-data /usr/src/nextcloud/ \
- && chown -R www-data:www-data /usr/src/nextcloud/custom_apps/ \
- && chown -R www-data:www-data /usr/src/nextcloud/config/ \
- && chown -R www-data:www-data /usr/src/nextcloud/data/ \
- && chown -R www-data:www-data /usr/src/nextcloud/themes/ \
  && chmod +x /usr/src/nextcloud/occ
 
 COPY docker-entrypoint.sh /entrypoint.sh
+COPY config/* /usr/src/nextcloud/config/
 
 ENTRYPOINT ["/entrypoint.sh"]
 CMD ["apache2-foreground"]
diff --git a/nextcloud_latest/docker-entrypoint.sh b/nextcloud_latest/docker-entrypoint.sh
index f073581..9298bb4 100755
--- a/nextcloud_latest/docker-entrypoint.sh
+++ b/nextcloud_latest/docker-entrypoint.sh
@@ -11,6 +11,13 @@ function directory_empty() {
     [ -n "$(find "$1"/ -prune -empty)" ]
 }
 
+function run_as() {
+  if [[ $EUID -eq 0 ]]; then
+    su - www-data -s /bin/bash -c "$1"
+  else
+    bash -c "$1"
+  fi
+}
 
 installed_version="0.0.0~unknown"
 if [ -f /var/www/html/version.php ]; then
@@ -25,28 +32,25 @@ fi
 
 if version_greater "$image_version" "$installed_version"; then
     if [ "$installed_version" != "0.0.0~unknown" ]; then
-        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_before
+        run_as 'php /var/www/html/occ app:list' > /tmp/list_before
+    fi
+    if [[ $EUID -eq 0 ]]; then
+      rsync_options="-rlDog --chown www-data:root"
+    else
+      rsync_options="-rlD"
     fi
-    rsync -a --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /usr/src/nextcloud/ /var/www/html/
-    
-    for dir in config data themes; do
+    rsync $rsync_options --delete --exclude /config/ --exclude /data/ --exclude /custom_apps/ --exclude /themes/ /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
-            cp -arT /usr/src/nextcloud/"$dir" /var/www/html/"$dir"
+            rsync $rsync_options --include /"$dir"/ --exclude '/*' /usr/src/nextcloud/ /var/www/html/
         fi
     done
 
-    if [ ! -d /var/www/html/custom_apps ] && [ ! -f /var/www/html/config/apps.config.php ]; then
-        cp -a /usr/src/nextcloud/config/apps.config.php /var/www/html/config/apps.config.php
-    fi
-
-    if [ ! -d /var/www/html/custom_apps ] || directory_empty /var/www/html/custom_apps; then
-        cp -arT /usr/src/nextcloud/custom_apps /var/www/html/custom_apps
-    fi
-
     if [ "$installed_version" != "0.0.0~unknown" ]; then
-        su - www-data -s /bin/bash -c 'php /var/www/html/occ upgrade --no-app-disable'
+        run_as 'php /var/www/html/occ upgrade --no-app-disable'
 
-        su - www-data -s /bin/bash -c 'php /var/www/html/occ app:list' > /tmp/list_after
+        run_as 'php /var/www/html/occ app:list' > /tmp/list_after
         echo "The following apps have beed disabled:"
         diff <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_before) <(sed -n "/Enabled:/,/Disabled:/p" /tmp/list_after) | grep '<' | cut -d- -f2 | cut -d: -f1
         rm -f /tmp/list_before /tmp/list_after
diff --git a/ruby_2.2-alpine/Dockerfile b/ruby_2.2-alpine/Dockerfile
index a68b9b7..db5d2c7 100644
--- a/ruby_2.2-alpine/Dockerfile
+++ b/ruby_2.2-alpine/Dockerfile
@@ -10,7 +10,7 @@ RUN mkdir -p /usr/local/etc \
 ENV RUBY_MAJOR 2.2
 ENV RUBY_VERSION 2.2.7
 ENV RUBY_DOWNLOAD_SHA256 234c8aee6543da9efd67008e6e7ee740d41ed57a52e797f65043c3b5ec3bcb53
-ENV RUBYGEMS_VERSION 2.6.12
+ENV RUBYGEMS_VERSION 2.6.13
 
 # some of ruby's build scripts are written in ruby
 #   we purge system ruby later to make sure our final image uses what we just built
diff --git a/ruby_2.2-slim/Dockerfile b/ruby_2.2-slim/Dockerfile
index 5b8bea2..71d144c 100644
--- a/ruby_2.2-slim/Dockerfile
+++ b/ruby_2.2-slim/Dockerfile
@@ -22,7 +22,7 @@ RUN mkdir -p /usr/local/etc \
 ENV RUBY_MAJOR 2.2
 ENV RUBY_VERSION 2.2.7
 ENV RUBY_DOWNLOAD_SHA256 234c8aee6543da9efd67008e6e7ee740d41ed57a52e797f65043c3b5ec3bcb53
-ENV RUBYGEMS_VERSION 2.6.12
+ENV RUBYGEMS_VERSION 2.6.13
 
 # some of ruby's build scripts are written in ruby
 #   we purge system ruby later to make sure our final image uses what we just built
diff --git a/ruby_2.2/Dockerfile b/ruby_2.2/Dockerfile
index da59cfe..edbc9a7 100644
--- a/ruby_2.2/Dockerfile
+++ b/ruby_2.2/Dockerfile
@@ -10,7 +10,7 @@ RUN mkdir -p /usr/local/etc \
 ENV RUBY_MAJOR 2.2
 ENV RUBY_VERSION 2.2.7
 ENV RUBY_DOWNLOAD_SHA256 234c8aee6543da9efd67008e6e7ee740d41ed57a52e797f65043c3b5ec3bcb53
-ENV RUBYGEMS_VERSION 2.6.12
+ENV RUBYGEMS_VERSION 2.6.13
 
 # some of ruby's build scripts are written in ruby
 #   we purge system ruby later to make sure our final image uses what we just built
diff --git a/ruby_2.3-alpine/Dockerfile b/ruby_2.3-alpine/Dockerfile
index e6596d4..8a0b6df 100644
--- a/ruby_2.3-alpine/Dockerfile
+++ b/ruby_2.3-alpine/Dockerfile
@@ -10,7 +10,7 @@ RUN mkdir -p /usr/local/etc \
 ENV RUBY_MAJOR 2.3
 ENV RUBY_VERSION 2.3.4
 ENV RUBY_DOWNLOAD_SHA256 341cd9032e9fd17c452ed8562a8d43f7e45bfe05e411d0d7d627751dd82c578c
-ENV RUBYGEMS_VERSION 2.6.12
+ENV RUBYGEMS_VERSION 2.6.13
 
 # some of ruby's build scripts are written in ruby
 #   we purge system ruby later to make sure our final image uses what we just built
diff --git a/ruby_2.3-slim/Dockerfile b/ruby_2.3-slim/Dockerfile
index 0c87182..3b1b3be 100644
--- a/ruby_2.3-slim/Dockerfile
+++ b/ruby_2.3-slim/Dockerfile
@@ -22,7 +22,7 @@ RUN mkdir -p /usr/local/etc \
 ENV RUBY_MAJOR 2.3
 ENV RUBY_VERSION 2.3.4
 ENV RUBY_DOWNLOAD_SHA256 341cd9032e9fd17c452ed8562a8d43f7e45bfe05e411d0d7d627751dd82c578c
-ENV RUBYGEMS_VERSION 2.6.12
+ENV RUBYGEMS_VERSION 2.6.13
 
 # some of ruby's build scripts are written in ruby
 #   we purge system ruby later to make sure our final image uses what we just built
diff --git a/ruby_2.3/Dockerfile b/ruby_2.3/Dockerfile
index 77c5b38..ce279b6 100644
--- a/ruby_2.3/Dockerfile
+++ b/ruby_2.3/Dockerfile
@@ -10,7 +10,7 @@ RUN mkdir -p /usr/local/etc \
 ENV RUBY_MAJOR 2.3
 ENV RUBY_VERSION 2.3.4
 ENV RUBY_DOWNLOAD_SHA256 341cd9032e9fd17c452ed8562a8d43f7e45bfe05e411d0d7d627751dd82c578c
-ENV RUBYGEMS_VERSION 2.6.12
+ENV RUBYGEMS_VERSION 2.6.13
 
 # some of ruby's build scripts are written in ruby
 #   we purge system ruby later to make sure our final image uses what we just built
diff --git a/ruby_alpine/Dockerfile b/ruby_alpine/Dockerfile
index a068e6a..d7174b4 100644
--- a/ruby_alpine/Dockerfile
+++ b/ruby_alpine/Dockerfile
@@ -10,7 +10,7 @@ RUN mkdir -p /usr/local/etc \
 ENV RUBY_MAJOR 2.4
 ENV RUBY_VERSION 2.4.1
 ENV RUBY_DOWNLOAD_SHA256 4fc8a9992de3e90191de369270ea4b6c1b171b7941743614cc50822ddc1fe654
-ENV RUBYGEMS_VERSION 2.6.12
+ENV RUBYGEMS_VERSION 2.6.13
 
 # some of ruby's build scripts are written in ruby
 #   we purge system ruby later to make sure our final image uses what we just built
diff --git a/ruby_alpine3.6/Dockerfile b/ruby_alpine3.6/Dockerfile
index 0df670a..6829180 100644
--- a/ruby_alpine3.6/Dockerfile
+++ b/ruby_alpine3.6/Dockerfile
@@ -10,7 +10,7 @@ RUN mkdir -p /usr/local/etc \
 ENV RUBY_MAJOR 2.4
 ENV RUBY_VERSION 2.4.1
 ENV RUBY_DOWNLOAD_SHA256 4fc8a9992de3e90191de369270ea4b6c1b171b7941743614cc50822ddc1fe654
-ENV RUBYGEMS_VERSION 2.6.12
+ENV RUBYGEMS_VERSION 2.6.13
 
 # some of ruby's build scripts are written in ruby
 #   we purge system ruby later to make sure our final image uses what we just built
diff --git a/ruby_latest/Dockerfile b/ruby_latest/Dockerfile
index 5a341b5..085c886 100644
--- a/ruby_latest/Dockerfile
+++ b/ruby_latest/Dockerfile
@@ -10,7 +10,7 @@ RUN mkdir -p /usr/local/etc \
 ENV RUBY_MAJOR 2.4
 ENV RUBY_VERSION 2.4.1
 ENV RUBY_DOWNLOAD_SHA256 4fc8a9992de3e90191de369270ea4b6c1b171b7941743614cc50822ddc1fe654
-ENV RUBYGEMS_VERSION 2.6.12
+ENV RUBYGEMS_VERSION 2.6.13
 
 # some of ruby's build scripts are written in ruby
 #   we purge system ruby later to make sure our final image uses what we just built
diff --git a/ruby_slim-stretch/Dockerfile b/ruby_slim-stretch/Dockerfile
index 9afa125..760ca10 100644
--- a/ruby_slim-stretch/Dockerfile
+++ b/ruby_slim-stretch/Dockerfile
@@ -22,7 +22,7 @@ RUN mkdir -p /usr/local/etc \
 ENV RUBY_MAJOR 2.4
 ENV RUBY_VERSION 2.4.1
 ENV RUBY_DOWNLOAD_SHA256 4fc8a9992de3e90191de369270ea4b6c1b171b7941743614cc50822ddc1fe654
-ENV RUBYGEMS_VERSION 2.6.12
+ENV RUBYGEMS_VERSION 2.6.13
 
 # some of ruby's build scripts are written in ruby
 #   we purge system ruby later to make sure our final image uses what we just built
diff --git a/ruby_slim/Dockerfile b/ruby_slim/Dockerfile
index 754be6b..f652161 100644
--- a/ruby_slim/Dockerfile
+++ b/ruby_slim/Dockerfile
@@ -22,7 +22,7 @@ RUN mkdir -p /usr/local/etc \
 ENV RUBY_MAJOR 2.4
 ENV RUBY_VERSION 2.4.1
 ENV RUBY_DOWNLOAD_SHA256 4fc8a9992de3e90191de369270ea4b6c1b171b7941743614cc50822ddc1fe654
-ENV RUBYGEMS_VERSION 2.6.12
+ENV RUBYGEMS_VERSION 2.6.13
 
 # some of ruby's build scripts are written in ruby
 #   we purge system ruby later to make sure our final image uses what we just built
diff --git a/ruby_stretch/Dockerfile b/ruby_stretch/Dockerfile
index c3ec4f6..acc0d49 100644
--- a/ruby_stretch/Dockerfile
+++ b/ruby_stretch/Dockerfile
@@ -10,7 +10,7 @@ RUN mkdir -p /usr/local/etc \
 ENV RUBY_MAJOR 2.4
 ENV RUBY_VERSION 2.4.1
 ENV RUBY_DOWNLOAD_SHA256 4fc8a9992de3e90191de369270ea4b6c1b171b7941743614cc50822ddc1fe654
-ENV RUBYGEMS_VERSION 2.6.12
+ENV RUBYGEMS_VERSION 2.6.13
 
 # some of ruby's build scripts are written in ruby
 #   we purge system ruby later to make sure our final image uses what we just built

@tianon
Copy link
Member Author

tianon commented Aug 28, 2017

Build test of #3378; 77c5fc8 (buildpack-deps, nextcloud, ruby):

$ bashbrew build buildpack-deps:artful-curl
Using bashbrew/cache:f670343eb6d03397c0c569c7e3f6d3b4e03590dd8218abfc1c5c9d131cc258ac (buildpack-deps:artful-curl)
Tagging buildpack-deps:artful-curl

$ test/run.sh buildpack-deps:artful-curl
testing buildpack-deps:artful-curl
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:artful-scm
Using bashbrew/cache:f6005b394f4b0ed44eb40175f19e51a2a05886901abbf1867bd6d55ada53c506 (buildpack-deps:artful-scm)
Tagging buildpack-deps:artful-scm

$ test/run.sh buildpack-deps:artful-scm
testing buildpack-deps:artful-scm
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:artful
Building bashbrew/cache:fc4399c8f735055ff5bf64a458606f4cd217e40e0a587fa90a150057211d9092 (buildpack-deps:artful)
Tagging buildpack-deps:artful

$ test/run.sh buildpack-deps:artful
testing buildpack-deps:artful
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:buster-curl
Using bashbrew/cache:4f87242f57d3f46c991e8609dffce48c5d6cb365b2cc54415fb4bff31740b9f8 (buildpack-deps:buster-curl)
Tagging buildpack-deps:buster-curl

$ test/run.sh buildpack-deps:buster-curl
testing buildpack-deps:buster-curl
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:buster-scm
Using bashbrew/cache:627590fa148e94dcd71f418d42702d35626a73f5124e835a26a43b9c9b5d37e3 (buildpack-deps:buster-scm)
Tagging buildpack-deps:buster-scm

$ test/run.sh buildpack-deps:buster-scm
testing buildpack-deps:buster-scm
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:buster
Building bashbrew/cache:c14013227140869606ea38401c7199fbd1ab66adcf1bd51d6621de51d59bb5f5 (buildpack-deps:buster)
Tagging buildpack-deps:buster

$ test/run.sh buildpack-deps:buster
testing buildpack-deps:buster
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:jessie-curl
Using bashbrew/cache:f0a5835d78a744e12e955f644c3ea0fe933a4dff046dcdeaada5c557b0612165 (buildpack-deps:jessie-curl)
Tagging buildpack-deps:jessie-curl

$ test/run.sh buildpack-deps:jessie-curl
testing buildpack-deps:jessie-curl
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:jessie-scm
Using bashbrew/cache:eedf2132df814692a6f0b1ce83be01d244d98b4d849ea5fcf639af1b4700e702 (buildpack-deps:jessie-scm)
Tagging buildpack-deps:jessie-scm

$ test/run.sh buildpack-deps:jessie-scm
testing buildpack-deps:jessie-scm
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:jessie
Building bashbrew/cache:bdecefc0084e1dea173fda847284cd5ba2eaea04358e34b66a474b3f6eec5b53 (buildpack-deps:jessie)
Tagging buildpack-deps:jessie

$ test/run.sh buildpack-deps:jessie
testing buildpack-deps:jessie
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:sid-curl
Using bashbrew/cache:bdf622072f19b0c391d154dd214f319ba794e265ddbc47093e11bb32abf1e6f6 (buildpack-deps:sid-curl)
Tagging buildpack-deps:sid-curl

$ test/run.sh buildpack-deps:sid-curl
testing buildpack-deps:sid-curl
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:sid-scm
Using bashbrew/cache:8aab13823e092656b9d5372cff7261678d1aa30f68dfa600af01131e692ca013 (buildpack-deps:sid-scm)
Tagging buildpack-deps:sid-scm

$ test/run.sh buildpack-deps:sid-scm
testing buildpack-deps:sid-scm
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:sid
Building bashbrew/cache:2b78cd2380ea50780bd3b7ad148f3d35f97182e1c07f11bcb05a124b32a58348 (buildpack-deps:sid)
Tagging buildpack-deps:sid

$ test/run.sh buildpack-deps:sid
testing buildpack-deps:sid
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:stretch-curl
Using bashbrew/cache:2dc704ed99214eb6bf2bed61d46572dd861cea71a37bb920324c189b61ca40b5 (buildpack-deps:stretch-curl)
Tagging buildpack-deps:stretch-curl
Tagging buildpack-deps:curl

$ test/run.sh buildpack-deps:stretch-curl
testing buildpack-deps:stretch-curl
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:stretch-scm
Using bashbrew/cache:b3ebacfdcdafc26e086550fab3a96360c565ac5012959e26b6d3aac81576c615 (buildpack-deps:stretch-scm)
Tagging buildpack-deps:stretch-scm
Tagging buildpack-deps:scm

$ test/run.sh buildpack-deps:stretch-scm
testing buildpack-deps:stretch-scm
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:stretch
Building bashbrew/cache:a0a35d8937922ab5bf5f3da032687a1e2626585d1d13b3925c27bab6082e2e48 (buildpack-deps:stretch)
Tagging buildpack-deps:stretch
Tagging buildpack-deps:latest

$ test/run.sh buildpack-deps:stretch
testing buildpack-deps:stretch
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:trusty-curl
Using bashbrew/cache:fed270f1e59639a064cdea0edeebaaf312c61df0883e11850bc88bc622d3252b (buildpack-deps:trusty-curl)
Tagging buildpack-deps:trusty-curl

$ test/run.sh buildpack-deps:trusty-curl
testing buildpack-deps:trusty-curl
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:trusty-scm
Using bashbrew/cache:6d42d3bbfb81ec84f9b8f14f86a8cb27e3b81d0fa84cdf3ab906c5f7ed612e76 (buildpack-deps:trusty-scm)
Tagging buildpack-deps:trusty-scm

$ test/run.sh buildpack-deps:trusty-scm
testing buildpack-deps:trusty-scm
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:trusty
Building bashbrew/cache:08040fbc743f6df348b2939bc2d2baffec929a3f1ca4adfc420260a11e321057 (buildpack-deps:trusty)
Tagging buildpack-deps:trusty

$ test/run.sh buildpack-deps:trusty
testing buildpack-deps:trusty
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:wheezy-curl
Using bashbrew/cache:1375b877ad91102615f77cb3a90029709ecc3307cfcc8f466d3edd65ffaea7ef (buildpack-deps:wheezy-curl)
Tagging buildpack-deps:wheezy-curl

$ test/run.sh buildpack-deps:wheezy-curl
testing buildpack-deps:wheezy-curl
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:wheezy-scm
Using bashbrew/cache:59b322db61a6639519cb67883923eabfb2b444ab64e37e1571c45499848f6d65 (buildpack-deps:wheezy-scm)
Tagging buildpack-deps:wheezy-scm

$ test/run.sh buildpack-deps:wheezy-scm
testing buildpack-deps:wheezy-scm
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:wheezy
Building bashbrew/cache:c6952433013e214c64caafd8be4a72b5986f18d034311e1aafa62fa61a00a304 (buildpack-deps:wheezy)
Tagging buildpack-deps:wheezy

$ test/run.sh buildpack-deps:wheezy
testing buildpack-deps:wheezy
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:xenial-curl
Using bashbrew/cache:8e5a46986cb803013b493187bb81b1f653aab13d1eecb5bbbc90490535e30dc8 (buildpack-deps:xenial-curl)
Tagging buildpack-deps:xenial-curl

$ test/run.sh buildpack-deps:xenial-curl
testing buildpack-deps:xenial-curl
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:xenial-scm
Using bashbrew/cache:3103fa2fc4809cd9d086ef8a31898fbad6e547eccbd55a4b2052bfb3efebeb58 (buildpack-deps:xenial-scm)
Tagging buildpack-deps:xenial-scm

$ test/run.sh buildpack-deps:xenial-scm
testing buildpack-deps:xenial-scm
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:xenial
Building bashbrew/cache:bb0050b6e2e9ec3f590137bb05b5b232cf50dc1f31beac0d69f84f7cea2c276d (buildpack-deps:xenial)
Tagging buildpack-deps:xenial

$ test/run.sh buildpack-deps:xenial
testing buildpack-deps:xenial
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:zesty-curl
Using bashbrew/cache:840f21656a094b2230e12ea05c04aa958c020b291c26cf31eb797c7b43200c4a (buildpack-deps:zesty-curl)
Tagging buildpack-deps:zesty-curl

$ test/run.sh buildpack-deps:zesty-curl
testing buildpack-deps:zesty-curl
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:zesty-scm
Using bashbrew/cache:d6d29168ee93821a49bcb310e91b5fd33d05f569b4d146475b433eafac0b0a9b (buildpack-deps:zesty-scm)
Tagging buildpack-deps:zesty-scm

$ test/run.sh buildpack-deps:zesty-scm
testing buildpack-deps:zesty-scm
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build buildpack-deps:zesty
Building bashbrew/cache:bb8a03c7cf2ce1cf69f063c27f845752a68cebc8c08dc5fb913af298d3ddf39f (buildpack-deps:zesty)
Tagging buildpack-deps:zesty

$ test/run.sh buildpack-deps:zesty
testing buildpack-deps:zesty
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed
$ bashbrew build nextcloud:11.0.4-apache
Building bashbrew/cache:8f8fa2a3357a74494199e7399ef3418f006fcfeeeff8ebe8b99337bf661ec3d2 (nextcloud:11.0.4-apache)
Tagging nextcloud:11.0.4-apache
Tagging nextcloud:11.0-apache
Tagging nextcloud:11-apache
Tagging nextcloud:11.0.4
Tagging nextcloud:11.0
Tagging nextcloud:11

$ test/run.sh nextcloud:11.0.4-apache
testing nextcloud:11.0.4-apache
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build nextcloud:11.0.4-fpm
Building bashbrew/cache:b97b43f2561bfc2f6b8f0cc416896697dbdc82934d7ce82eb2f5c2dd2fbb9968 (nextcloud:11.0.4-fpm)
Tagging nextcloud:11.0.4-fpm
Tagging nextcloud:11.0-fpm
Tagging nextcloud:11-fpm

$ test/run.sh nextcloud:11.0.4-fpm
testing nextcloud:11.0.4-fpm
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build nextcloud:12.0.2-apache
Building bashbrew/cache:d7cc4737cbd18f3f1ecc343027e5cbc5fde85a1378efa09dc0c165c4ffc46cd6 (nextcloud:12.0.2-apache)
Tagging nextcloud:12.0.2-apache
Tagging nextcloud:12.0-apache
Tagging nextcloud:12-apache
Tagging nextcloud:apache
Tagging nextcloud:12.0.2
Tagging nextcloud:12.0
Tagging nextcloud:12
Tagging nextcloud:latest

$ test/run.sh nextcloud:12.0.2-apache
testing nextcloud:12.0.2-apache
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed


$ bashbrew build nextcloud:12.0.2-fpm
Building bashbrew/cache:1b9e81e976bba3d7f2027231be8b6c0434d4ae8fd3082a76ed19fc5eff62347a (nextcloud:12.0.2-fpm)
Tagging nextcloud:12.0.2-fpm
Tagging nextcloud:12.0-fpm
Tagging nextcloud:12-fpm
Tagging nextcloud:fpm

$ test/run.sh nextcloud:12.0.2-fpm
testing nextcloud:12.0.2-fpm
	'utc' [1/4]...passed
	'cve-2014--shellshock' [2/4]...passed
	'no-hard-coded-passwords' [3/4]...passed
	'override-cmd' [4/4]...passed
$ bashbrew build ruby:2.4.1-stretch
Building bashbrew/cache:ac9a0239a8e31d0391e010a5188a812a672ffb45286ffcb731ffa4bb06a27b95 (ruby:2.4.1-stretch)
Tagging ruby:2.4.1-stretch
Tagging ruby:2.4-stretch
Tagging ruby:2-stretch
Tagging ruby:stretch

$ test/run.sh ruby:2.4.1-stretch
testing ruby:2.4.1-stretch
	'utc' [1/9]...passed
	'cve-2014--shellshock' [2/9]...passed
	'no-hard-coded-passwords' [3/9]...passed
	'override-cmd' [4/9]...passed
	'ruby-hello-world' [5/9]...passed
	'ruby-standard-libs' [6/9]...passed
	'ruby-gems' [7/9]...passed
	'ruby-bundler' [8/9]...passed
	'ruby-nonroot' [9/9]...passed


$ bashbrew build ruby:2.4.1-slim-stretch
Building bashbrew/cache:33fd5bfa7942e5e6c8790e7c7651cdd32b37487969a970d58e37e40580fe43aa (ruby:2.4.1-slim-stretch)
Tagging ruby:2.4.1-slim-stretch
Tagging ruby:2.4-slim-stretch
Tagging ruby:2-slim-stretch
Tagging ruby:slim-stretch

$ test/run.sh ruby:2.4.1-slim-stretch
testing ruby:2.4.1-slim-stretch
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'ruby-hello-world' [5/7]...passed
	'ruby-standard-libs' [6/7]...passed
	'ruby-nonroot' [7/7]...passed


$ bashbrew build ruby:2.4.1-jessie
Building bashbrew/cache:543074f17a77a8f1e96eea7fba963887a4e6c480d1d850005636347d7fc34a88 (ruby:2.4.1-jessie)
Tagging ruby:2.4.1-jessie
Tagging ruby:2.4-jessie
Tagging ruby:2-jessie
Tagging ruby:jessie
Tagging ruby:2.4.1
Tagging ruby:2.4
Tagging ruby:2
Tagging ruby:latest

$ test/run.sh ruby:2.4.1-jessie
testing ruby:2.4.1-jessie
	'utc' [1/9]...passed
	'cve-2014--shellshock' [2/9]...passed
	'no-hard-coded-passwords' [3/9]...passed
	'override-cmd' [4/9]...passed
	'ruby-hello-world' [5/9]...passed
	'ruby-standard-libs' [6/9]...passed
	'ruby-gems' [7/9]...passed
	'ruby-bundler' [8/9]...passed
	'ruby-nonroot' [9/9]...passed


$ bashbrew build ruby:2.4.1-slim-jessie
Building bashbrew/cache:8cba93bad10449a75120c4c305366b512a78208ef953b5db6e3618d2fc169cbf (ruby:2.4.1-slim-jessie)
Tagging ruby:2.4.1-slim-jessie
Tagging ruby:2.4-slim-jessie
Tagging ruby:2-slim-jessie
Tagging ruby:slim-jessie
Tagging ruby:2.4.1-slim
Tagging ruby:2.4-slim
Tagging ruby:2-slim
Tagging ruby:slim

$ test/run.sh ruby:2.4.1-slim-jessie
testing ruby:2.4.1-slim-jessie
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'ruby-hello-world' [5/7]...passed
	'ruby-standard-libs' [6/7]...passed
	'ruby-nonroot' [7/7]...passed


$ bashbrew build ruby:2.4.1-onbuild
Building bashbrew/cache:af36bf0cabac34822aa2c9b51b0a67a00e96be3a578d276d747bd393397cac1d (ruby:2.4.1-onbuild)
Tagging ruby:2.4.1-onbuild
Tagging ruby:2.4-onbuild
Tagging ruby:2-onbuild
Tagging ruby:onbuild

$ test/run.sh ruby:2.4.1-onbuild
testing ruby:2.4.1-onbuild
	'override-cmd' [1/1]...passed


$ bashbrew build ruby:2.4.1-alpine3.6
Building bashbrew/cache:48d9d7e03106a57eedad48d3f0dd86a52a3ed8adfecf25c55beda29f1f3d6696 (ruby:2.4.1-alpine3.6)
Tagging ruby:2.4.1-alpine3.6
Tagging ruby:2.4-alpine3.6
Tagging ruby:2-alpine3.6
Tagging ruby:alpine3.6

$ test/run.sh ruby:2.4.1-alpine3.6
testing ruby:2.4.1-alpine3.6
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'ruby-hello-world' [5/7]...passed
	'ruby-standard-libs' [6/7]...passed
	'ruby-nonroot' [7/7]...passed


$ bashbrew build ruby:2.4.1-alpine3.4
Building bashbrew/cache:c03f7eb7a343bbbd56739c1be537a249714cf11fdbb7ca168c6d46d9ff5f7b34 (ruby:2.4.1-alpine3.4)
Tagging ruby:2.4.1-alpine3.4
Tagging ruby:2.4-alpine3.4
Tagging ruby:2-alpine3.4
Tagging ruby:alpine3.4
Tagging ruby:2.4.1-alpine
Tagging ruby:2.4-alpine
Tagging ruby:2-alpine
Tagging ruby:alpine

$ test/run.sh ruby:2.4.1-alpine3.4
testing ruby:2.4.1-alpine3.4
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'ruby-hello-world' [5/7]...passed
	'ruby-standard-libs' [6/7]...passed
	'ruby-nonroot' [7/7]...passed


$ bashbrew build ruby:2.3.4-jessie
Building bashbrew/cache:e830bec8a9922a77a7c6bd0e2437045dfe2209fd406ed8427590d7454d2e3b2c (ruby:2.3.4-jessie)
Tagging ruby:2.3.4-jessie
Tagging ruby:2.3-jessie
Tagging ruby:2.3.4
Tagging ruby:2.3

$ test/run.sh ruby:2.3.4-jessie
testing ruby:2.3.4-jessie
	'utc' [1/9]...passed
	'cve-2014--shellshock' [2/9]...passed
	'no-hard-coded-passwords' [3/9]...passed
	'override-cmd' [4/9]...passed
	'ruby-hello-world' [5/9]...passed
	'ruby-standard-libs' [6/9]...passed
	'ruby-gems' [7/9]...passed
	'ruby-bundler' [8/9]...passed
	'ruby-nonroot' [9/9]...passed


$ bashbrew build ruby:2.3.4-slim-jessie
Building bashbrew/cache:20a93970e7cf2311820836734b4790339b1333cf955e608d784961d2ad6da6e7 (ruby:2.3.4-slim-jessie)
Tagging ruby:2.3.4-slim-jessie
Tagging ruby:2.3-slim-jessie
Tagging ruby:2.3.4-slim
Tagging ruby:2.3-slim

$ test/run.sh ruby:2.3.4-slim-jessie
testing ruby:2.3.4-slim-jessie
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'ruby-hello-world' [5/7]...passed
	'ruby-standard-libs' [6/7]...passed
	'ruby-nonroot' [7/7]...passed


$ bashbrew build ruby:2.3.4-onbuild
Building bashbrew/cache:a9ac72425a79fe0221d716178cb425d7c9d627c8afe0a9a705b172b2cd93e241 (ruby:2.3.4-onbuild)
Tagging ruby:2.3.4-onbuild
Tagging ruby:2.3-onbuild

$ test/run.sh ruby:2.3.4-onbuild
testing ruby:2.3.4-onbuild
	'override-cmd' [1/1]...passed


$ bashbrew build ruby:2.3.4-alpine3.4
Building bashbrew/cache:1d54a0b47f9f2125b28d3c3e3df7af4560b02b0a1699b9007bab63081569d260 (ruby:2.3.4-alpine3.4)
Tagging ruby:2.3.4-alpine3.4
Tagging ruby:2.3-alpine3.4
Tagging ruby:2.3.4-alpine
Tagging ruby:2.3-alpine

$ test/run.sh ruby:2.3.4-alpine3.4
testing ruby:2.3.4-alpine3.4
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'ruby-hello-world' [5/7]...passed
	'ruby-standard-libs' [6/7]...passed
	'ruby-nonroot' [7/7]...passed


$ bashbrew build ruby:2.2.7-jessie
Building bashbrew/cache:51c5617796796f7287c459ff58e9863ac4abace7880848196336bbebbcc28abc (ruby:2.2.7-jessie)
Tagging ruby:2.2.7-jessie
Tagging ruby:2.2-jessie
Tagging ruby:2.2.7
Tagging ruby:2.2

$ test/run.sh ruby:2.2.7-jessie
testing ruby:2.2.7-jessie
	'utc' [1/9]...passed
	'cve-2014--shellshock' [2/9]...passed
	'no-hard-coded-passwords' [3/9]...passed
	'override-cmd' [4/9]...passed
	'ruby-hello-world' [5/9]...passed
	'ruby-standard-libs' [6/9]...passed
	'ruby-gems' [7/9]...passed
	'ruby-bundler' [8/9]...passed
	'ruby-nonroot' [9/9]...passed


$ bashbrew build ruby:2.2.7-slim-jessie
Building bashbrew/cache:20da926e9d5f5011f8b79c4c69e28e0341372d41020de5a34b4c90bf73e3cd20 (ruby:2.2.7-slim-jessie)
Tagging ruby:2.2.7-slim-jessie
Tagging ruby:2.2-slim-jessie
Tagging ruby:2.2.7-slim
Tagging ruby:2.2-slim

$ test/run.sh ruby:2.2.7-slim-jessie
testing ruby:2.2.7-slim-jessie
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'ruby-hello-world' [5/7]...passed
	'ruby-standard-libs' [6/7]...passed
	'ruby-nonroot' [7/7]...passed


$ bashbrew build ruby:2.2.7-onbuild
Building bashbrew/cache:66a3f15bacbda67cc67d9950fb5dc702271b1035c035a411f872ef3ee0bb7ef9 (ruby:2.2.7-onbuild)
Tagging ruby:2.2.7-onbuild
Tagging ruby:2.2-onbuild

$ test/run.sh ruby:2.2.7-onbuild
testing ruby:2.2.7-onbuild
	'override-cmd' [1/1]...passed


$ bashbrew build ruby:2.2.7-alpine3.4
Building bashbrew/cache:00e45e3dca17ced20c5ebea172d6ca41b1c45cad01491a86aaa14eb4ed7ef7a9 (ruby:2.2.7-alpine3.4)
Tagging ruby:2.2.7-alpine3.4
Tagging ruby:2.2-alpine3.4
Tagging ruby:2.2.7-alpine
Tagging ruby:2.2-alpine

$ test/run.sh ruby:2.2.7-alpine3.4
testing ruby:2.2.7-alpine3.4
	'utc' [1/7]...passed
	'cve-2014--shellshock' [2/7]...passed
	'no-hard-coded-passwords' [3/7]...passed
	'override-cmd' [4/7]...passed
	'ruby-hello-world' [5/7]...passed
	'ruby-standard-libs' [6/7]...passed
	'ruby-nonroot' [7/7]...passed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants