diff options
| author | Sam Yaple <sam@yaple.net> | 2015-05-10 23:48:38 -0500 |
|---|---|---|
| committer | Sam Yaple <sam@yaple.net> | 2015-05-11 08:47:50 -0500 |
| commit | 95234ea533fffd1260e443933de271256cd4caef (patch) | |
| tree | 07b5e2096195b9bb159f176f9834815bcf4671a0 | |
| parent | 56e72a6bcf1f06081d5513c79080436001c2afcc (diff) | |
| download | kolla-95234ea533fffd1260e443933de271256cd4caef.tar.gz kolla-95234ea533fffd1260e443933de271256cd4caef.zip | |
Additional option to cleanup even failed containers
Also support --pull flag to pull the latest version of the base
Change-Id: I3205d6e799772138edaf2b0666353c19dfbf52f0
| -rwxr-xr-x | tools/build-docker-image | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/tools/build-docker-image b/tools/build-docker-image index 2aec82236..5d85f6263 100755 --- a/tools/build-docker-image +++ b/tools/build-docker-image @@ -18,7 +18,9 @@ Options: --namespace, -n <namespace> --tag, -t <tag> --push, -p +--force-rm, -f --no-cache, -N +--pull, -u --release --no-use-released-parent EOF @@ -27,7 +29,7 @@ EOF [ -f $TOPDIR/.buildconf ] && . $TOPDIR/.buildconf [ -f $IMGDIR/.buildconf ] && . $IMGDIR/.buildconf -ARGS=$(getopt -o hn:t:pN -l help,namespace:,push,release,tag:,no-cache,no-use-released-parent -- "$@") || { usage >&2; exit 2; } +ARGS=$(getopt -o hn:t:pfuN -l help,namespace:,push,pull,release,tag:,force-rm,no-cache,no-use-released-parent -- "$@") || { usage >&2; exit 2; } eval set -- "$ARGS" @@ -50,6 +52,13 @@ while :; do (--push|-p) PUSH=1 ;; + (--pull|-u) BUILDFLAGS="${BUILDFLAGS} --pull=true" + ;; + + (--force-rm|-f) + BUILDFLAGS="${BUILDFLAGS} --force-rm=true" + ;; + (--no-cache|-N) BUILDFLAGS="${BUILDFLAGS} --no-cache" ;; |
