Fix notebook directory permissions for non-root user
Pre-create /app/notebooks/{user,examples} with correct ownership
before switching to the spicebook user. Without this, the app crashes
with PermissionError when it tries to create these directories at
runtime.
This commit is contained in:
parent
a24375accb
commit
7ffd3f1bd3
@ -46,7 +46,9 @@ RUN --mount=type=cache,target=/root/.cache/uv \
|
||||
uv pip install --system .
|
||||
|
||||
# Run as non-root
|
||||
RUN useradd --create-home --shell /bin/bash spicebook
|
||||
RUN useradd --create-home --shell /bin/bash spicebook && \
|
||||
mkdir -p /app/notebooks/user /app/notebooks/examples && \
|
||||
chown -R spicebook:spicebook /app/notebooks
|
||||
USER spicebook
|
||||
|
||||
EXPOSE 8000
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user