Run as root so the app can write SQLite to the root-owned /app/data volume

This commit is contained in:
inference-bot committed 2026-09-05 22:21:42 -06:00
1 parent ef467423ac
commit f3cc8e1d89
1 file changed
+5 -3
+5 -3
View File
@@ -9,9 +9,11 @@ RUN pip install --no-cache-dir -r requirements.txt
# Copy app # Copy app
COPY app/ ./app/ COPY app/ ./app/
# Cloudron runs as UID 1000 # Run as root (the base image default). Cloudron's sandboxing (read-only
RUN mkdir -p /app/data && chown -R 1000:1000 /app/data /app/code # rootfs, AppArmor, dropped capabilities) still applies to root inside the
USER 1000 # container, and /app/data is mounted as a root-owned volume, so running as
# root is required for the app to write its SQLite store there.
RUN mkdir -p /app/data
EXPOSE 8000 EXPOSE 8000