788 B
788 B
cap_drop: ALL Breaks redis-alpine Startup
Applies when: adding Linux capability restrictions to Docker Compose services, especially Redis or any image that switches users at startup.
redis:7-alpineentrypoint callsgosu redisto drop from root to theredisuser.gosurequiresSETUIDandSETGIDcapabilities to switch users.cap_drop: ALLwithoutcap_add: [SETUID, SETGID]prevents the user switch, causing immediate container exit.- The container logs show no error -- it just exits silently with code 1.
- Decision (2026-03-24): removed all cap_drop/cap_add from both compose files. For a dev-only local stack, the complexity and debugging cost outweigh the security benefit. Revisit for production deployment with proper per-service capability analysis.