podman-compose
podman-compose copied to clipboard
CMD-SHELL healthcheck passed as json array
Describe the bug Podman-compose passes CMD-SHELL healthcheck as json array instead of string as
To Reproduce Add healthcheck like
healthcheck:
test: [
"CMD-SHELL",
"http_proxy='' wget -nv -t1 --spider 'http://localhost:8123/' || exit 1",
]
Expected behavior According to podman 3.4.4 documentation
Multiple options can be passed in the form of a JSON array; otherwise, the command will be interpreted as an argument to /bin/sh -c.
--healthcheck-command http_proxy='' wget -nv -t1 --spider 'http://localhost:8123/' || exit 1
Actual behavior
--healthcheck-command ["http_proxy='' wget -nv -t1 --spider 'http://localhost:8123/' || exit 1"]
Btw documented command is --health-cmd at least for 3.4.4
Output
Podman-compose from current master (1.4.0 like)
Also invalid command generated for strings.
healthcheck:
test: redis-cli ping | grep PONG
has been turned to --healthcheck-command ["CMD-SHELL", "redis-cli ping | grep PONG"]
Instead of --healthcheck-command "redis-cli ping | grep PONG"