Commit 927989f
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 04116c0 commit 927989f
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| |||
0 commit comments