Docker cache issue using Colima

478 Views Asked by At

I am using Colima instead of Docker Desktop.

I have an API service in a Dockerfile that has a 2-stage build. I have a docker-compose file with the (stage) target not specified. So I expect both stages to be executed when I run:

docker-compose build --no-cache api
docker-compose up api

The issue is that when I change the code in an endpoint. Those changes are not shown unless I specifically delete the image and the container, build with --no-cache again and then run the following command:

docker-compose up --force-recreate api

Note: The project is a Golang api and the executable is produced in stage 0 of the Dockerfile. It is then copied through to stage 1 where it is used.

So although I managed to move on with this problem, the situation is not viable for everyday development. And I am investigating, trying to find how to further debug Colima. I suspect something being cached in a level not visible to me.

0

There are 0 best solutions below