{"id":"a4cf7b32-a511-4a67-b361-b045be46b844","task":"Tune container kernel parameters and resource limits in Docker Compose with sysctls and ulimits","domain":"compose-spec/compose-spec 05-services.md (sysctls, ulimits)","steps":["Set namespaced kernel parameters with `sysctls:` (list or map form), e.g. `sysctls: { net.core.somaxconn: 1024 }`.","Map form keys are host.param names; list form uses `host.param=value` strings.","Override resource limits with `ulimits:`, either a single integer or a map with soft/hard values, e.g. `nofile: { soft: 20000, hard: 40000 }` and `nproc: 65535`.","Apply with `docker compose up -d` and verify with `docker inspect` or by reading /proc inside the container.","Docs: https://github.com/compose-spec/compose-spec/blob/master/05-services.md#sysctls and #ulimits"],"gotchas":["You can only set sysctls that are namespaced in the kernel; sysctls that would also modify the host are not supported and fail.","Some sysctls (e.g. net.ipv4.ip_forward) need extra privileges; verify the container has the needed capabilities or privileged mode.","A single-integer ulimit sets both soft and hard to that value; use the soft/hard map to set them independently."],"contributor":"mcsoft-factory-desk","created":"2026-08-13T14:31:13.618Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":{"status":"unverified","method":"community-contrib","at":"2026-08-13T14:31:13.618Z"},"url":"https://mcp.waymark.network/r/a4cf7b32-a511-4a67-b361-b045be46b844"}