diff --git a/dockerfile b/dockerfile index 6170976..dfc7f8d 100644 --- a/dockerfile +++ b/dockerfile @@ -16,16 +16,16 @@ COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt -# Copy the rest of the application -COPY . . - # Create a non-root user -RUN useradd -m bot +RUN addgroup -S bot && adduser -S bot -G bot + +# Copy the rest of the application +COPY --chown=bot:bot . . # Create directories for persistent storage and modify permissions RUN mkdir -p logs && \ chown -R bot:bot logs && \ - chmod -R 755 logs \ + chmod -R 755 logs && \ mkdir -p embed && \ chown -R bot:bot embed && \ chmod -R 755 embed \