How can I clear image cache with docker-compose

Solution for How can I clear image cache with docker-compose
is Given Below:

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?

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