No description
- Shell 78.3%
- Dockerfile 21.7%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
- trap HUP INT QUIT USR1 USR2 TERM ALRM WINCH, exit on TERM INT QUIT - wait on a background sleep: the trap runs at once (stop 0.1 s, was 1 s) - TRAP_IGNORE to test the stop timeouts of an orchestrator - HTTP_PORT: busybox httpd, / answers HTTP_BODY (ok), /cgi-bin/id the hostname, addresses and start time - posix sh, date -u, script in /usr/local/bin - alpine pinned to 3.21, --no-cache, OCI labels |
||
| cgi-bin | ||
| Dockerfile | ||
| probe.sh | ||
| README.md | ||
container_probe
A tiny container for the tests of container orchestrators: it logs the signals it receives, reacts to them at once, and optionally serves http to prove it is reachable, and which container answered.
Based on alpine, with tini as pid 1. Runs as nobody. 12 MB.
Signals
HUP, INT, QUIT, USR1, USR2, TERM, ALRM and WINCH are logged on stdout. TERM, INT and QUIT stop the container, with exit status 0, in a few milliseconds.
$ docker logs probe
2026-10-28 09:35:34 started, pid 7, ignoring ''
2026-10-28 09:35:35 SIGHUP received
2026-10-28 09:35:36 SIGTERM received
2026-10-28 09:35:36 exiting
Environment
| Variable | Effect |
|---|---|
HTTP_PORT |
serve http on this port (above 1024: the container runs as nobody) |
HTTP_BODY |
the body of /, default ok |
TRAP_IGNORE |
signals logged but not acted on, ex TERM INT, to test the stop timeout and the kill of an orchestrator |
Http
$ docker run -d --name probe -e HTTP_PORT=8080 forge.opensvc.com/opensvc/container_probe
$ curl http://<address>:8080/
ok
$ curl http://<address>:8080/cgi-bin/id
hostname: f12e2b120314
started: 2026-10-28 09:35:34
address: lo 127.0.0.1/8
address: eth0 172.17.0.2/16
Build
docker build -t forge.opensvc.com/opensvc/container_probe:1 .
docker push forge.opensvc.com/opensvc/container_probe:1
Formerly docker_signal_trap, on github.