An administrator is troubleshooting a container that fails its health check repeatedly. The container definition needs a health check that runs curl -f http://localhost/ || exit 1 every 30s, with a 5s timeout and 3 retries, starting after a 10s grace period. Which flag combination implements this correctly in podman run?
Trap 1: podman run --healthcheck="curl -f http://localhost/" --interval=30…
The flags must use the --health- prefix (e.g., --health-cmd, --health-interval).
Trap 2: podman run --health-probe="curl -f http://localhost/"…
--health-probe and --health-delay are invalid options; the correct flags are --health-cmd and --health-start-period.
Trap 3: podman run --check-command="curl -f http://localhost/"…
--check-command and --check-period are invalid flag names.
- A
podman run --healthcheck="curl -f http://localhost/" --interval=30 --timeout=5 --retries=3 webapp
Why wrong: The flags must use the --health- prefix (e.g., --health-cmd, --health-interval).
- B
podman run --health-probe="curl -f http://localhost/" --health-delay=10s webapp
Why wrong: --health-probe and --health-delay are invalid options; the correct flags are --health-cmd and --health-start-period.
- C
podman run --health-cmd="curl -f http://localhost/ || exit 1" --health-interval=30s --health-timeout=5s --health-retries=3 --health-start-period=10s webapp
These are the correct exact flags for configuring container health checks in Podman.
- D
podman run --check-command="curl -f http://localhost/" --check-period=30s webapp
Why wrong: --check-command and --check-period are invalid flag names.