feat: use container name instead of container id for run:detached output

Closes #5170
This commit is contained in:
Jose Diaz-Gonzalez
2022-08-22 21:49:54 -04:00
parent a4554b794e
commit 60acf68412
3 changed files with 7 additions and 1 deletions

View File

@@ -0,0 +1,5 @@
# 0.29.0 Migration Guide
## Changes
The output of `run:detached` now uses the container name - eg. `node-js-app.run.1` - vs the container id.

View File

@@ -18,6 +18,7 @@ Docker releases updates periodically to their engine. We recommend reading their
Before upgrading, check the migration guides to get comfortable with new features and prepare your deployment to be upgraded.
- [Upgrading to 0.29](/docs/appendices/0.29.0-migration-guide.md)
- [Upgrading to 0.28](/docs/appendices/0.28.0-migration-guide.md)
- [Upgrading to 0.27](/docs/appendices/0.27.0-migration-guide.md)
- [Upgrading to 0.26](/docs/appendices/0.26.0-migration-guide.md)

View File

@@ -122,7 +122,7 @@ trigger-scheduler-docker-local-scheduler-run() {
local EXIT_CODE=0 DOKKU_CONTAINER_EXIT_CODE=0
if [[ "$DOKKU_DETACH_CONTAINER" == "1" ]]; then
"$DOCKER_BIN" container start "${DOCKER_START_ARGS_ARRAY[@]}" "$CONTAINER_ID" >/dev/null || DOKKU_CONTAINER_EXIT_CODE=$?
echo "$CONTAINER_ID"
"$DOCKER_BIN" container inspect --format "{{.Name}}" "$CONTAINER_ID" | cut -c2-
else
"$DOCKER_BIN" container start "${DOCKER_START_ARGS_ARRAY[@]}" "$CONTAINER_ID" || EXIT_CODE=$?
DOKKU_CONTAINER_EXIT_CODE="$("$DOCKER_BIN" container wait "$CONTAINER_ID" 2>/dev/null || echo "$EXIT_CODE")"