Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Docker Compose: No such image

The old cache caused this issue, I failed to run this command the first time and docker-compose already created images which I can't see from docker images.

Need to check from docker-compose ps, and remove all old images with this command docker-compose rm, then rebuild again.


I encountered this error when using Docker Machine on Windows.

A container seems to have gone rogue; docker-compose rm --all caused the whole shell to freeze and restarting Docker Machine didn't help either, the container still showed up when doing docker-compose ps.

The solution was to execute docker-compose down.


To solve this issue

docker-compose -f docker-compose-filename.yml down

docker-compose -f docker-compose-filename.yml up

To see all images

docker images -a

Problem was solved for me by doing

docker-compose ps

finding the problematic container name and then (note running docker here)

docker rm <problematic container name>

On Ubuntu 18.04.4 and Docker version 19.03.6

I tried Yogesh Yadav's answer, but

$ docker-compose -f docker-compose-filename.yml up

command froze my terminal on running 'current locks'.

I was able to solve it by listing the containers:

$ docker-compose ps

And removing the problematic containers one by one, running:

$ docker rm <name_of_the_problematic_container>