When running Lagident inside Docker, the ICMP pinger consistently fails with:
Error running pinger for : socket: permission denied
This occurs even when:
- The container runs as root
- NET_RAW and NET_ADMIN capabilities are added
- /bin/ping works inside the container
- Raw sockets work normally
- Host networking is enabled
- The target is 127.0.0.1 (loopback)
This suggests the issue is inside Lagident’s ICMP implementation rather than the container environment.
for testing purposes, I tried adding NET_RAW, NET_ADMIN and switching the network_mode to host
Docker Compose:
services:
lagident:
cap_add:
- NET_RAW
- NET_ADMIN
network_mode: host
environment:
- DB_TYPE=sqlite
- PROFILE=prod
volumes:
- ./lagident-sqlite-data:/data
container_name: lagident
image: nook24/lagident:latest
restart: unless-stopped
Tests:
- /bin/ping works (ICMP succeeds)
- Verified Raw socket capability present: CapEff: 00000000a80435fb
- Lagident runs as root
- ICMP to 8.8.8.8 works
- ICMP to 127.0.0.1 works via /bin/ping
Yet Lagident logs:
Error running pinger for 127.0.0.1: socket: permission denied
When running Lagident inside Docker, the ICMP pinger consistently fails with:
Error running pinger for : socket: permission denied
This occurs even when:
This suggests the issue is inside Lagident’s ICMP implementation rather than the container environment.
for testing purposes, I tried adding NET_RAW, NET_ADMIN and switching the network_mode to host
Docker Compose:
Tests:
Yet Lagident logs: