The problem here is whenever I try to create a docker image from the same branch in my Dockerfile, the docker itself tag the already built image with the new one using cache.
And without cache, it usually takes a lot of time.
What I have been doing to avoid this process is having a new branch every time which contains the new changes and then run docker build
, which I think is definitely not a good practice.
I tried to find something for which I can use the cache but without using a few layers that I want to rebuild again, unfortunately, I couldn't find one.
Is there any other approach?