Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
2 views
in DevOps and Agile by (29.3k points)

I have to build a Docker image from a Docker file using the below command.

$ docker build -t u12_core -f u12_core .

When I am trying to rebuild it with the same command, it's using the build cache. The cache shows that aerospike is installed. However, I don't find it inside containers spawn from this image, so I want to rebuild this image without using the cache. How can I force Docker to rebuild a clean image without the cache?

1 Answer

0 votes
by (50.2k points)

For this there is a --no-cache option that you could use

docker build --no-cache -t u12_core -f u12_core .

In older versions you need to pass --no-cache=true

Browse Categories

...