Docker: Uses an image, skipping (docker-compose)
Solution 1:
I found out, I was being stupid.
I didn't need to run docker-compose build
I can just directly run docker-compose up
since then it'll pull the images down, the build
is just to build locally
Solution 2:
in my case below command worked:
docker-compose up --force-recreate
I hope this helps!
Solution 3:
Clarification: This message (<service> uses an image, skipping
)
is NOT an error. It's informing the user that the service uses Image and it's therefore pre-built, So it's skipped by the build command.
In other words - You don't need build , you need to up
the service.
Solution:
run sudo docker-compose up <your-service>
PS: In case you changed some configuration on your docker-compose use --force-recreate
flag to apply the changes and creating it again.
sudo docker-compose up --force-recreate <your-service>
Solution 4:
My problem was that I wanted to upgrade the image
so I tried to use:
docker build --no-cache
docker-compose up --force-recreate
docker-compose up --build
None of which rebuild the image.
What is missing ( from this post ) is:
docker-compose stop
docker-compose rm -f # remove old images
docker-compose pull # download new images
docker-compose up -d