From 1eca9841675fde50a229f6272918e4bb83dfa6d0 Mon Sep 17 00:00:00 2001 From: c6ristian Date: Mon, 29 Jul 2024 19:21:50 +0200 Subject: [PATCH 1/5] nextcloud: try a .keep file to save the folder --- nextcloud/Containerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/nextcloud/Containerfile b/nextcloud/Containerfile index 5a3c30d..ac8eafb 100644 --- a/nextcloud/Containerfile +++ b/nextcloud/Containerfile @@ -4,7 +4,8 @@ FROM docker.io/library/nextcloud:${TAG} RUN apt-get update \ && apt-get install -y supervisor \ && rm -rf /var/lib/apt/lists/* \ - && mkdir /var/log/supervisord /var/run/supervisord + && mkdir -p /var/log/supervisord /var/run/supervisord \ + && touch /var/log/supervisord/.keep /var/run/supervisord/.keep COPY supervisord.conf / -- 2.44.1 From 88569e05f515cb06f2898b297e150c6988da8c1c Mon Sep 17 00:00:00 2001 From: c6ristian Date: Mon, 29 Jul 2024 19:46:31 +0200 Subject: [PATCH 2/5] COPY .keep --- nextcloud/.keep | 0 nextcloud/Containerfile | 6 ++++-- 2 files changed, 4 insertions(+), 2 deletions(-) create mode 100644 nextcloud/.keep diff --git a/nextcloud/.keep b/nextcloud/.keep new file mode 100644 index 0000000..e69de29 diff --git a/nextcloud/Containerfile b/nextcloud/Containerfile index ac8eafb..583bb1c 100644 --- a/nextcloud/Containerfile +++ b/nextcloud/Containerfile @@ -4,8 +4,10 @@ FROM docker.io/library/nextcloud:${TAG} RUN apt-get update \ && apt-get install -y supervisor \ && rm -rf /var/lib/apt/lists/* \ - && mkdir -p /var/log/supervisord /var/run/supervisord \ - && touch /var/log/supervisord/.keep /var/run/supervisord/.keep + && mkdir -p /var/log/supervisord /var/run/supervisord + +COPY .keep /var/log/supervisord/ +COPY .keep /var/run/supervisord/ COPY supervisord.conf / -- 2.44.1 From cc2f0cdc8109083f24dc9c0491b6870bf964f92e Mon Sep 17 00:00:00 2001 From: c6ristian Date: Mon, 29 Jul 2024 19:53:52 +0200 Subject: [PATCH 3/5] no keep var log --- nextcloud/Containerfile | 1 - 1 file changed, 1 deletion(-) diff --git a/nextcloud/Containerfile b/nextcloud/Containerfile index 583bb1c..0b12d28 100644 --- a/nextcloud/Containerfile +++ b/nextcloud/Containerfile @@ -6,7 +6,6 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /var/log/supervisord /var/run/supervisord -COPY .keep /var/log/supervisord/ COPY .keep /var/run/supervisord/ COPY supervisord.conf / -- 2.44.1 From 2fd26d6f6f6ae0fdb2991561de5cf71763904853 Mon Sep 17 00:00:00 2001 From: c6ristian Date: Mon, 29 Jul 2024 19:55:52 +0200 Subject: [PATCH 4/5] no keep var run --- nextcloud/Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nextcloud/Containerfile b/nextcloud/Containerfile index 0b12d28..8cc4fe2 100644 --- a/nextcloud/Containerfile +++ b/nextcloud/Containerfile @@ -6,7 +6,7 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /var/log/supervisord /var/run/supervisord -COPY .keep /var/run/supervisord/ +#COPY .keep /var/run/supervisord/ COPY supervisord.conf / -- 2.44.1 From 59d03f97a3f429e2035da30c079fd6c5277d9eec Mon Sep 17 00:00:00 2001 From: c6ristian Date: Mon, 29 Jul 2024 20:15:58 +0200 Subject: [PATCH 5/5] explain why the COPY step exists --- nextcloud/Containerfile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nextcloud/Containerfile b/nextcloud/Containerfile index 8cc4fe2..d139a4d 100644 --- a/nextcloud/Containerfile +++ b/nextcloud/Containerfile @@ -6,10 +6,11 @@ RUN apt-get update \ && rm -rf /var/lib/apt/lists/* \ && mkdir -p /var/log/supervisord /var/run/supervisord -#COPY .keep /var/run/supervisord/ +# We need to copy a file to the supervisord folder in /var/run so it exists when the container starts. +COPY .keep /var/run/supervisord/ COPY supervisord.conf / ENV NEXTCLOUD_UPDATE=1 -CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"] +CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"] \ No newline at end of file -- 2.44.1