chore: standardize on ls subcommand when interacting with the docker binary
The ls command is what is referenced in the --help output for the subcommands, so we should just use that everywhere.
This commit is contained in:
@@ -37,7 +37,7 @@ trigger-scheduler-docker-local-core-post-deploy() {
|
||||
local NAME="$APP.$DYNO"
|
||||
local CURRENT_CONTAINER_ID="$(<"$container")"
|
||||
# TODO: Ensure these are from the current service
|
||||
local PREVIOUS_CIDS=$("$DOCKER_BIN" container list --all --quiet --filter name="^.?$NAME\$" | xargs) || true
|
||||
local PREVIOUS_CIDS=$("$DOCKER_BIN" container ls --all --quiet --filter name="^.?$NAME\$" | xargs) || true
|
||||
if [[ -n $PREVIOUS_CIDS ]]; then
|
||||
dokku_log_verbose_quiet "Found previous container(s) ($PREVIOUS_CIDS) named $NAME"
|
||||
# in case $PREVIOUS_CIDS has more than one entry
|
||||
|
||||
@@ -14,7 +14,7 @@ trigger-scheduler-docker-local-scheduler-pre-restore() {
|
||||
|
||||
# delete all "old" containers
|
||||
# shellcheck disable=SC2046
|
||||
"$DOCKER_BIN" container rm $("$DOCKER_BIN" container list --all --format "{{.Names}}" --filter "label=$DOKKU_CONTAINER_LABEL" --quiet | grep -E '(.+\..+\.[0-9]+\.[0-9]+$)') &>/dev/null || true
|
||||
"$DOCKER_BIN" container rm $("$DOCKER_BIN" container ls --all --format "{{.Names}}" --filter "label=$DOKKU_CONTAINER_LABEL" --quiet | grep -E '(.+\..+\.[0-9]+\.[0-9]+$)') &>/dev/null || true
|
||||
}
|
||||
|
||||
trigger-scheduler-docker-local-scheduler-pre-restore "$@"
|
||||
|
||||
Reference in New Issue
Block a user