diff mbox series

[layerindex-web,3/3] Dockerfile: create the task logs directory

Message ID 20261114003041.15197-4-tim.orling@konsulko.com
State Under Review
Delegated to: Tim Orling
Headers show
Series Fix the Update Layer button | expand

Commit Message

Tim Orling Nov. 14, 2026, 12:30 a.m. UTC
The docker-compose setups mount a volume at the task logs directory in
layersapp and layerscelery. The image did not have that directory, so
the volume belonged to root, and the Celery worker, running as the
layers user, could not write the task log: an update started with the
Update Layer button failed without any log. Create the directory, owned
by the layers user, so that a new volume takes its ownership.

[YOCTO #15395]

AI-Generated: Claude Opus 5.5
Signed-off-by: Tim Orling <tim.orling@konsulko.com>
---
 Dockerfile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/Dockerfile b/Dockerfile
index f4d19ab..85918d0 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -68,9 +68,11 @@  COPY docker/updatelayers.sh ${APP_DIR}/updatelayers.sh
 COPY docker/migrate.sh ${APP_DIR}/migrate.sh
 COPY docker/connectivity_check.sh ${APP_DIR}/connectivity_check.sh
 
-RUN mkdir ${APP_DIR}/workdir \
+# The task logs directory is a volume shared with layerscelery; create it
+# here so that the volume belongs to the layers user
+RUN mkdir ${APP_DIR}/workdir ${APP_DIR}/layerindex-task-logs \
 	&& adduser --system --uid=500 --home /home/layers layers \
-	&& chown -R layers ${APP_DIR}/workdir
+	&& chown -R layers ${APP_DIR}/workdir ${APP_DIR}/layerindex-task-logs
 USER layers
 
 # Always copy in .gitconfig and proxy helper script (they need editing to be active)