|
|
@ -40,6 +40,7 @@ while getopts ':fcl:e:h' arg; do |
|
|
|
?) badarg "Invalid option '-$OPTARG'";; |
|
|
|
esac |
|
|
|
done |
|
|
|
shift $((OPTIND -1)) |
|
|
|
|
|
|
|
# Handle non-option arguments |
|
|
|
if [[ $# -lt 1 ]]; then |
|
|
@ -52,7 +53,7 @@ if [[ $# -gt 2 ]]; then |
|
|
|
badarg "Too many arguments" |
|
|
|
fi |
|
|
|
|
|
|
|
if [[ -n $2 ]]; then |
|
|
|
if [[ $# -eq 2 ]]; then |
|
|
|
container="$2" |
|
|
|
else |
|
|
|
container="$image" |
|
|
@ -62,14 +63,14 @@ fi |
|
|
|
if [[ $opt_config -eq 1 ]]; then |
|
|
|
echo "Getting deploy options from image metadata label '$opt_label' ..." |
|
|
|
deployconf=$(podman image inspect -f "{{ .Config.Labels.${opt_label} }}" "$image") |
|
|
|
if [[ $config == "<no value>" ]]; then |
|
|
|
if [[ $deployconf == "<no value>" ]]; then |
|
|
|
echo "Error: could not find image metadata label '$opt_label'" |
|
|
|
exit 1 |
|
|
|
fi |
|
|
|
else |
|
|
|
deployconf="" |
|
|
|
fi |
|
|
|
deployconf="$deployconf $opts_extras" |
|
|
|
deployconf="$deployconf $opt_extras" |
|
|
|
|
|
|
|
if [[ $opt_force -eq 1 ]]; then |
|
|
|
podman rm -i -f "$container" |
|
|
|