Use --no-cache when building Dockerfile

Since `docker build` is only invoked when actually building a new image
from a Dockerfile, using `--no-cache` allows to have an updated image
even if the Dockerfile hasn't changed.
This works well with Dockerfiles using `git` or packages referencing
latest versions instead of "static" ones.
This commit is contained in:
Loïc Guitaut
2015-06-11 12:05:07 +02:00
parent 8880a9ce84
commit 9a71fff3f1

View File

@@ -41,7 +41,7 @@ case "$1" in
# buildstep pluginhooks don't necessarily make sense for dockerfiles. call the new breed!!!
pluginhook pre-build-dockerfile "$APP"
docker build -t "$IMAGE" .
docker build --no-cache -t "$IMAGE" .
pluginhook post-build-dockerfile "$APP"
;;