When building a Docker image with docker build and Dockerfile by default, commands like apt will not run every build because the stage is cached.
This post will show how to disable caching during a Docker build process.
By default, an apt command will not run during the second run of a Docker build command.
In the following example, I’m using the no-cache command switch that disables caching.
docker build --tag appbuild . --no-cache