Reputation: 4589
When I run docker-compose up
, I get this error:
root@ubuntu:/home/benson/Docker/HaproxyMy# docker-compose up
Recreating 950ddc308278_950ddc308278_950ddc308278_950ddc308278_950ddc308278_haproxymy_webb_1
Recreating 485800bdf3a1_485800bdf3a1_485800bdf3a1_485800bdf3a1_485800bdf3a1_haproxymy_webc_1
Recreating 2b3338d88716_2b3338d88716_2b3338d88716_2b3338d88716_2b3338d88716_haproxymy_weba_1
ERROR: for webb No such image: sha256:15853e771e7ca3f5eecee38fcf97efd3ee164c1b66e2ef543d9985a04e78e099
ERROR: for webc No such image: sha256:15853e771e7ca3f5eecee38fcf97efd3ee164c1b66e2ef543d9985a04e78e099
ERROR: for weba No such image: sha256:15853e771e7ca3f5eecee38fcf97efd3ee164c1b66e2ef543d9985a04e78e099
docker-compose.yml
:
weba:
build: ./web
expose:
- 80
webb:
build: ./web
expose:
- 80
webc:
build: ./web
expose:
- 80
haproxy:
image: haproxy:latest
volumes:
- ./haproxy:/haproxy-override
- ./haproxy/haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
links:
- weba
- webb
- webc
ports:
- "80:80"
- "70:70"
expose:
- "80"
- "70"
Upvotes: 134
Views: 143066
Reputation: 1298
I solved this by following this page: https://community.home-assistant.io/t/portainer-issue-with-creation-of-new-container/194757/7
I just pulled the image through terminal: $ docker pull postgres:14
and started the service on portainer and it works!
Upvotes: 0
Reputation: 1145
Here is my final command/answer based off the top answers
clear && docker-compose -f {my-file} down --remove-orphans && docker-compose -f {my-file} up --build --remove-orphans
replace {my-file}
with the name/path of your docker compose file
Upvotes: 0
Reputation: 777
This helped me!
docker-compose -f <replace with yml config file-name> down
Upvotes: 0
Reputation: 659
On Docker Desktop Mac, I was getting all kinds of "image not found" errors from docker and docker-compose, couldn't docker-compose down
or docker system prune
or docker ps
or anything.
What I ended up doing was:
$ docker pull debian
$ docker tag debian $MISSING_IMAGE_NAME
$ docker system prune -a
and that seemed to get things going.
(Note that I was still getting "Error response from daemon: platform unknown not supported" until I ran the prune. Honestly, I just assumed that any data left in the daemon was suspect and needed to be flushed with prejudice.)
Upvotes: 0
Reputation: 1155
our issue was low disk space on the swarm worker. resolved by freeing some space at /var/lib/docker
on swarmworker node and redeploying.
Upvotes: 0
Reputation: 1445
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>
Upvotes: 4
Reputation: 4589
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.
Upvotes: 269
Reputation: 1270
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>
Upvotes: 24
Reputation: 4745
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
Upvotes: 53
Reputation: 34293
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
.
docker-compose down
.Upvotes: 138
Reputation: 1323065
Examples using weba, webb and webc like "How to use Docker Compose to run complex multi container apps on your Raspberry Pi" suppose that you are building those images.
weba:
build: .
expose:
- 80
Meaning you have (in /home/benson/Docker/HaproxyMy
) a Dockerfile
like this one which will be interpreted by the build . to build those images.
Upvotes: 0