Docker-compose build re build local images that are loaded from tar images using docker load

i used
1- docker commit container image
2- docker save image to image.tar
3- i loaded the image using docker load image.tar
when i run docker-compose up it works perfectly up containers But if i run docker build it tries to rebuild every thing and recompile my image

my Question is :- why docker compose didn’t recognize loaded images and treat it differently than images built through docker-compose build ?

Maybe you should check the docker-compose.yml file to see if you are using a compile value or an image value. Personally I prefer to create the images with “docker build” and only pass as parameter the name of the image to the file docker-compose.yml

1 Like

u are right my docker compose file having build not the image name i tried it and it worked thank you