fix: use correct quoting in format template when fetching exposed image ports
This commit is contained in:
@@ -102,7 +102,8 @@ fn-builder-dockerfile-get-ports-from-image() {
|
||||
declare desc="return all exposed ports from passed image name"
|
||||
declare IMAGE="$1"
|
||||
|
||||
local ports="$("$DOCKER_BIN" image inspect --format "{{range $key, $value := .Config.ExposedPorts}}{{$key}} {{end}}" "$IMAGE" | xargs)" || true
|
||||
# shellcheck disable=SC2016
|
||||
local ports="$("$DOCKER_BIN" image inspect --format '{{range $key, $value := .Config.ExposedPorts}}{{$key}} {{end}}' "$IMAGE" | xargs)" || true
|
||||
echo "$ports"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user