fix: use correct quoting in format template when fetching exposed image ports
This commit is contained in:
1 parent
d6468f4713
commit
c1279468d8
1 file changed
+2
-1
@@ -102,7 +102,8 @@ fn-builder-dockerfile-get-ports-from-image() {
|
|||||||
declare desc="return all exposed ports from passed image name"
|
declare desc="return all exposed ports from passed image name"
|
||||||
declare IMAGE="$1"
|
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"
|
echo "$ports"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user