From 6458bf661314fae49f255506254fa6f17712c1a5 Mon Sep 17 00:00:00 2001 From: szaimen Date: Thu, 27 Oct 2022 15:58:40 +0200 Subject: [PATCH] fix chaning to root user Signed-off-by: szaimen --- Containers/nextcloud/Dockerfile | 2 +- Containers/nextcloud/start.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Containers/nextcloud/Dockerfile b/Containers/nextcloud/Dockerfile index 2ef874b5..4a68eb3e 100644 --- a/Containers/nextcloud/Dockerfile +++ b/Containers/nextcloud/Dockerfile @@ -253,6 +253,6 @@ RUN echo "root:$(openssl rand -base64 12)" | chpasswd USER root ENTRYPOINT ["/start.sh"] -CMD ["sudo", "-u", "www-data", "/usr/bin/supervisord", "-c", "/supervisord.conf"] +CMD ["sudo", "-uE", "www-data", "/usr/bin/supervisord", "-c", "/supervisord.conf"] HEALTHCHECK CMD (sudo -u www-data nc -z localhost 9000 && sudo -u www-data nc -z localhost 7867) || exit 1 \ No newline at end of file diff --git a/Containers/nextcloud/start.sh b/Containers/nextcloud/start.sh index 8ca26e70..53bf29b0 100644 --- a/Containers/nextcloud/start.sh +++ b/Containers/nextcloud/start.sh @@ -37,7 +37,7 @@ fi sudo -u www-data rm -f "$NEXTCLOUD_DATA_DIR/this-is-a-test-file" # Run original entrypoint -if ! sudo -u www-data bash /entrypoint.sh; then +if ! sudo -uE www-data bash /entrypoint.sh; then exit 1 fi