Run as root so the app can write SQLite to the root-owned /app/data volume
This commit is contained in:
1 parent
ef467423ac
commit
f3cc8e1d89
1 file changed
+5
-3
+5
-3
@@ -9,9 +9,11 @@ RUN pip install --no-cache-dir -r requirements.txt
|
||||
# Copy app
|
||||
COPY app/ ./app/
|
||||
|
||||
# Cloudron runs as UID 1000
|
||||
RUN mkdir -p /app/data && chown -R 1000:1000 /app/data /app/code
|
||||
USER 1000
|
||||
# Run as root (the base image default). Cloudron's sandboxing (read-only
|
||||
# rootfs, AppArmor, dropped capabilities) still applies to root inside the
|
||||
# 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
|
||||
|
||||
|
||||
Reference in new issue
Block a user