refactor: use new-style docker management commands
This PR uses the new syntax for commands introduced in Docker 1.13, making it a bit easier to understand just what a particular command is trying to do. This also pushes the long-form syntax for docker command flags, which are also easier to understand at a glance.
This commit is contained in:
1 parent
c02059c965
commit
44fcea0ffa
34 files changed
+104
-103
No files matched your search
@@ -27,7 +27,7 @@ scheduler-docker-local-scheduler-retire() {
|
||||
fi
|
||||
|
||||
fn-scheduler-docker-local-retire-container "$APP" "$CID" "$DEAD_TIME"
|
||||
STATE="$("$DOCKER_BIN" inspect -f "{{ .State.Status }}" "$CID" 2>/dev/null || true)"
|
||||
STATE="$("$DOCKER_BIN" container inspect --format "{{ .State.Status }}" "$CID" 2>/dev/null || true)"
|
||||
if [[ -z "$STATE" ]]; then
|
||||
DEAD_CONTAINERS+=("$CID")
|
||||
continue
|
||||
@@ -38,8 +38,8 @@ scheduler-docker-local-scheduler-retire() {
|
||||
continue
|
||||
fi
|
||||
|
||||
"$DOCKER_BIN" rm -f "$CID" >/dev/null 2>&1 || true
|
||||
if "$DOCKER_BIN" inspect "${CID}" >/dev/null 2>&1; then
|
||||
"$DOCKER_BIN" container rm --force "$CID" >/dev/null 2>&1 || true
|
||||
if "$DOCKER_BIN" container inspect "${CID}" >/dev/null 2>&1; then
|
||||
dokku_log_warn "Container ${CID} still running"
|
||||
continue
|
||||
fi
|
||||
|
||||
Reference in new issue
Block a user