Browse Source

added redo option to pdm-build

feature/startup-from-labels
Mar Alegre 4 years ago
parent
commit
fd878c44f2
  1. 10
      .install/bin/pdm-build

10
.install/bin/pdm-build

@ -30,7 +30,8 @@ If second argument is omitted, the directory where the files were found is used
as the image name.
Options:
-s Squash all newly built layers in the image into a single layer
-s Squash all layers in the image into a single layer
-r Redo build from scratch instead of using cached layers
-d Debug mode: don't delete the temporary container created by the script
when encountering an error
-t [tag] Tag the image with the given string. Can be used multiple times to assign
@ -39,11 +40,13 @@ Options:
# Handle options
opt_squash=0
opt_redo=0
opt_debug=0
opt_tags=()
while getopts ':sdt:h' arg; do
case $arg in
s) opt_squash=1;;
r) opt_redo=1;;
d) opt_debug=1;;
t) opt_tags+=("${OPTARG}");;
h) echo "$help"; exit 0;;
@ -81,7 +84,10 @@ fi
buildopts=""
if [[ $opt_squash -eq 1 ]]; then
buildopts="$buildopts --squash"
buildopts="$buildopts --squash-all"
fi
if [[ $opt_redo -eq 1 ]]; then
buildopts="$buildopts --no-cache"
fi
# tell buildah to build images in docker format instead of the default OCI format

Loading…
Cancel
Save