build-image.sh: Support passing arguments to podman build
This commit is contained in:
parent
8ecfade5c4
commit
1c1f8126d7
|
@ -4,10 +4,13 @@ script_path="$(dirname "$(realpath "$0")")"
|
|||
. "$script_path/functions.sh"
|
||||
assert_prerequisites
|
||||
|
||||
image_name="$(relative_path_to_image_name "$1")"
|
||||
image_path="$1"
|
||||
image_name="$(relative_path_to_image_name "$image_path")"
|
||||
|
||||
shift
|
||||
|
||||
# Load config if we have it
|
||||
[ -f "$script_path/$1/control" ] && . "$script_path/$1/control"
|
||||
[ -f "$script_path/$image_path/control" ] && . "$script_path/$image_path/control"
|
||||
|
||||
extra_args=""
|
||||
|
||||
|
@ -27,4 +30,4 @@ if [ ! -z "$upstream_ver" ]; then
|
|||
extra_args="$extra_args --build-arg UPSTREAM_VERSION=$upstream_ver"
|
||||
fi
|
||||
|
||||
podman build -t "$image_name" "$script_path/$1" $extra_args
|
||||
podman build -t "$image_name" "$script_path/$image_path" $extra_args "$@"
|
||||
|
|
Loading…
Reference in a new issue