Docker Compose: No such image

Solution 1:

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.

Solution 2:

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.