diff --git a/Dockerfile b/Dockerfile index af5657c..aa0c415 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,10 +11,6 @@ RUN pip install --no-cache-dir -r requirements.txt COPY bot.py ./ COPY vpn_bot ./vpn_bot -RUN useradd --create-home --uid 10001 botuser \ - && mkdir -p /app/data \ - && chown -R botuser:botuser /app - -USER botuser +RUN mkdir -p /app/data CMD ["python", "bot.py", "--config", "/app/config.toml"] diff --git a/README.md b/README.md index cacafc3..6472dee 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,7 @@ Files used by Docker: - `Dockerfile` builds a small Python image for the bot. - `docker-compose.yml` mounts `./config.toml` read-only into the container. - `docker-compose.yml` mounts `./data` to `/app/data` so SQLite data persists across restarts/rebuilds. +- The container runs as root so it can write to the bind-mounted `./data` directory on normal Docker/Podman setups. If you change the container user, make sure that user can write to `./data`. - `.dockerignore` keeps secrets, local DB files, virtualenvs, and caches out of the image build context. ## Admin usage