Avoiding "stale" Docker Images

Sometimes you want to get the latest and greatest content out of your Docker build. There are two valuable options to avoid creating stale Docker images:

--no-cache=false         Do not use cache when building the image
--pull=false             Always attempt to pull a newer version of the image

The drawback when using this command line is pretty clear: No caching anymore which results in longer build times.

$ docker build --no-cache=true --pull=true .
Show Comments