Score:0

Docker container started running in ubuntu . But then again saying "No such container"

us flag

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

sudo docker build -t ssh-mock . --no-cache
sudo docker run --rm -d --name ssh-mock -p 9991:9991 ssh-mock
sudo docker logs -f ssh-mock

I ran these commands to build , run and view the logs. As shown in the picture as I understand it started running, but then again it is saying that "No such container"

Artur Meinild avatar
vn flag
Please include output of `docker ps -a`
Pasan Jayawickrama avatar
us flag
@ArturMeinild Added please check
Artur Meinild avatar
vn flag
Please include output of `docker version`, `snap list` and `apt policy docker.io`.
Artur Meinild avatar
vn flag
Also check what's in syslog when you try to start the container - are there any error messages?
user2005651 avatar
cn flag
Since you use the --rm flag it means that your container is deleted after its main process stops. Are you sure that yout containers "ENTRYPOINT" is running correctly ?
Artur Meinild avatar
vn flag
Yeah running without `--rm` would be wise for troubleshooting purposes.
Pasan Jayawickrama avatar
us flag
@ArturMeinild Added the responses of docker version, snap list and apt policy docker.io
Pasan Jayawickrama avatar
us flag
@dominz88 This command has worked before. I had to reinstall ubuntu recently and now it is not working
Artur Meinild avatar
vn flag
The container doesn't come up. Run without `--rm`. Then it will show in the list with `docker ps -a`. Then you can troubleshoot why the container doesn't start.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.