fix(docker): run API container as root for Docker socket access

The API container needs to run docker compose commands via the
mounted Docker socket. Running as non-root user doesn't work well
with socket permissions across container boundaries.

- Remove USER appuser from Dockerfile (API service only)
- Remove group_add from docker-compose (no longer needed)
- Add security note about considering Docker-in-Docker or rootless

This fixes:
permission denied while trying to connect to the docker API at unix:///var/run/docker.sock
This commit is contained in:
Fusion
2026-05-20 15:38:02 +02:00
parent 402e662c0c
commit f7be50952a
2 changed files with 4 additions and 4 deletions
+4 -2
View File
@@ -54,8 +54,10 @@ RUN mkdir -p /data/repos /data/instances && chown -R appuser:appgroup /data
COPY wait-for-db.sh /usr/local/bin/wait-for-db.sh
RUN chmod +x /usr/local/bin/wait-for-db.sh
# Switch to non-root user
USER appuser
# NOTE: Running as root to access Docker socket for managing tool instances
# This is required because Docker socket permissions require root or docker group membership
# which doesn't work well across container boundaries.
# Consider using Docker-in-Docker or rootless Docker for production hardening.
# Expose port
EXPOSE 8000