Hands-on task
A container without a shell: nsenter instead of docker exec
The ledger accounting service runs in a Docker container built from a minimal image: inside there's only the binary and its libraries — no sh, no ip, no curl, so docker exec won't help here. After an overnight experiment the service stopped passing its health check: it listens on 127.0.0.1:8080 inside the container, and /health no longer opens.
Find the cause and fix the live container: you may not restart or recreate it — it holds an unwritten queue in memory. Take the tools from the host: nsenter, ip, curl.
- nsenter
- namespaces
- docker
- ip