stage18: docker hardening — non-root user, read-only FS, no-new-privileges, health-check fix, .dockerignore

This commit is contained in:
NSCT Agent
2026-08-28 16:22:23 +00:00
parent b23ff5a565
commit 60679083fa
8 changed files with 2802 additions and 3 deletions

View File

@@ -7,6 +7,8 @@ x-common: &common
env_file:
- .env
restart: unless-stopped
security_opt:
- no-new-privileges:true
deploy:
resources:
limits:
@@ -85,7 +87,7 @@ services:
volumes:
- nsct_data:/app/data
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8080/health || exit 1"]
test: ["CMD-SHELL", "python -c \"import urllib.request; urllib.request.urlopen('http://localhost:8080/health')\" || exit 1"]
interval: 30s
timeout: 5s
retries: 3