diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 57c82860..2db2c8e2 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -16,6 +16,7 @@ COPY --chmod=775 *.sh / COPY --chmod=774 upgrade.exclude /upgrade.exclude COPY config/*.php / COPY supervisord.conf /supervisord.conf +COPY root.motd /root.motd VOLUME /mnt/ncdata VOLUME /var/www/html @@ -256,6 +257,7 @@ RUN set -ex; \ mkdir -p /nc-updater; \ chown -R www-data:www-data /nc-updater; \ chmod -R 770 /nc-updater; \ + echo "[ -n \"$TERM\" ] && cat /root.motd" >> /root/.bashrc; \ \ # Give root a random password echo "root:$(openssl rand -base64 12)" | chpasswd diff --git a/Containers/nextcloud/root.motd b/Containers/nextcloud/root.motd new file mode 100644 index 00000000..d3cae8a9 --- /dev/null +++ b/Containers/nextcloud/root.motd @@ -0,0 +1,4 @@ +Warning: You have logged in into the Nextcloud container as root user. +See https://github.com/nextcloud/all-in-one#how-to-run-occ-commands if you want to run occ commands. +Apart from that, you can use 'sudo -u www-data -E php occ ' in order to run occ commands. +Of course needs to be substituted with the command that you want to use.