Update container permissions

This commit is contained in:
2025-08-10 08:39:32 -07:00
parent 13e1a983d9
commit c553c6877e

View File

@@ -13,6 +13,11 @@ RUN apt-get update && apt-get install -y \
# Copy requirements first to leverage Docker cache
COPY requirements.txt .
# Create a user with given UID.
RUN useradd -m -u 5000 bot
USER bot
RUN id
# Install Python dependencies
RUN pip install --no-cache-dir -r requirements.txt
@@ -20,7 +25,8 @@ RUN pip install --no-cache-dir -r requirements.txt
COPY . .
# Create directories for persistent storage
RUN mkdir -p /data/logs
RUN mkdir -p /app/logs
RUN chown -R bot:bot /app
# Create a non-root user and switch to it
RUN useradd -m botuser && chown -R botuser:botuser /app