Run Docker Build Without Caching

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.

Disable Cache

In the following example, I’m using the no-cache command switch that disables caching.

docker build --tag appbuild . --no-cache

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.