Commit 60f2179
committed
Add Podman compatibility to vox:build task
Prior to this commit, running the `vox:build` task via the
`podman-docker` shim would fail as `podman ls --format json` prints
an empty array, `[]`, when no containers match `--filter`. This differs
from `docker ls` behavior of printing nothing to STDOUT. This extra
output resulted in the `container_exists` function returning a false
positive, which caused the task to fail when trying to run `podman stop`
on containers that didn't exist.
This commit changes the command to use `--format '{{json .ID}}'` as
this produces the same behavior from both `podman` and `docker`:
no STDOUT when nothing matches, and a quoted string containing the
container ID when there is a match.
Signed-off-by: Charlie Sharpsteen <charlie@overlookinfratech.com>1 parent ec8163b commit 60f2179
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| |||
0 commit comments