containers / containers/podman-compose
CMD-SHELL healthcheck passed as json array
- Dominant language
- Python
- Stars
- 6.2k
- Forks
- 622
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Podman-compose [passes](https://github.com/containers/podman-compose/blob/8eb55735e95ee1587d0d22582aa86b9175e25ca9/podman_compose.py#L1293) 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](https://github.com/containers/podman-compose/blob/8eb55735e95ee1587d0d22582aa86b9175e25ca9/podman_compose.py#L42) (1.4.0 like)
Contributor guide
Assessment
This issue has not been assessed yet.