diff --git a/Dockerfile-alpine.template b/Dockerfile-alpine.template index db405303..289dfda2 100644 --- a/Dockerfile-alpine.template +++ b/Dockerfile-alpine.template @@ -111,8 +111,7 @@ RUN set -ex; \ chmod +x /usr/src/nextcloud/occ; \ apk del .fetch-deps -COPY *.sh / -COPY config/* /usr/src/nextcloud/config/ +COPY rootfs / ENTRYPOINT ["/entrypoint.sh"] CMD ["%%CMD%%"] diff --git a/Dockerfile-debian.template b/Dockerfile-debian.template index ab6f88f9..9cdebe8b 100644 --- a/Dockerfile-debian.template +++ b/Dockerfile-debian.template @@ -126,8 +126,7 @@ RUN set -ex; \ apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false $fetchDeps; \ rm -rf /var/lib/apt/lists/* -COPY *.sh / -COPY config/* /usr/src/nextcloud/config/ +COPY rootfs / ENTRYPOINT ["/entrypoint.sh"] CMD ["%%CMD%%"] diff --git a/update.sh b/update.sh index 263935a7..75fa0c24 100755 --- a/update.sh +++ b/update.sh @@ -80,17 +80,22 @@ function create_variant() { s/%%REDIS_VERSION%%/'"${pecl_versions[redis]}"'/g; ' "$dir/Dockerfile" + rootfs_dir="$dir/rootfs" + mkdir -p "$rootfs_dir" + # Copy the shell scripts for name in entrypoint cron; do - cp "docker-$name.sh" "$dir/$name.sh" + cp "docker-$name.sh" "$rootfs_dir/$name.sh" done # Copy the config directory - cp -rT .config "$dir/config" + src_dir="$rootfs_dir/usr/src/nextcloud" + mkdir -p "$src_dir" + cp -rT .config "$src_dir/config" # Remove Apache config if we're not an Apache variant. if [ "$variant" != "apache" ]; then - rm "$dir/config/apache-pretty-urls.config.php" + rm "$src_dir/config/apache-pretty-urls.config.php" fi for arch in i386 amd64; do