bstricks
bstricks

Reputation: 923

How can I clear image cache with docker-compose

I have an intermediate image that stays cached which doesn't work for me because I need to clone a github repo on each build. How can I clear this?

Upvotes: 3

Views: 7966

Answers (2)

Dmytro Chasovskyi
Dmytro Chasovskyi

Reputation: 3641

As mentioned in this thread, you can delete all images, networks and more.

docker system prune -a

NOTE: I post it here, as the above answer wasn't enough to fix my cache issue.

Upvotes: 4

bstricks
bstricks

Reputation: 923

To clear the cache, I ended up running the following command:

docker-compose -f ../bin/docker-compose-dev.yaml build --force-rm --no-cache && docker-compose -f ../bin/docker-compose-dev.yaml up

Upvotes: 4

Related Questions