From e41ffb0b28e439d25a05dfc6fccff07fbdf74a12 Mon Sep 17 00:00:00 2001 From: Joe Thompson Date: Wed, 7 Jul 2021 22:22:15 -0400 Subject: [PATCH] Add additional logic to entrypoint to handle more subcommands. (#1350) --- CHANGELOG.md | 2 ++ docker/docker-entrypoint.sh | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index fa32976a11..6c6b1e5639 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -47,6 +47,8 @@ Boundary) but it's worth repeating. causing an error when the scheduler attempts to run jobs ([issue](https://github.com/hashicorp/boundary/issues/1309), [PR](https://github.com/hashicorp/boundary/pull/1310)). +* Docker: update entrypoint script to handle more Boundary subcommands for + better UX ## 0.3.0 (2021/06/08) diff --git a/docker/docker-entrypoint.sh b/docker/docker-entrypoint.sh index 994b1d809f..d22d0f83ed 100755 --- a/docker/docker-entrypoint.sh +++ b/docker/docker-entrypoint.sh @@ -19,6 +19,10 @@ if [ "$1" = 'server' ]; then shift set -- boundary server \ "$@" +elif boundary --help "$1" 2>&1 | grep -q "boundary $1"; then + # We can't use the return code to check for the existence of a subcommand, so + # we have to use grep to look for a pattern in the help output. + set -- boundary "$@" fi # If we are running Boundary, make sure it executes as the proper user.