Docker swarm-manager displays old container information

I am using docker-machine with Google Compute Engine(GCE)
to run a
docker swarm cluster. I created a swarm successfully with 2
nodes
(swnd-01 & swnd-02) in the cluster. I created a daemon container
like this
in the swarm-manager environment:
docker run -d ubuntu /bin/bash

docker ps shows the container running on swnd-01. When I tried
executing a command over the container using docker exec I get the
error that container is not running while docker ps shows otherwise.
I ssh‘ed into swnd-01 via docker-machine to come to know that container
exited as soon as it was created. I tried docker run command inside the
swnd-01 but it still exits. I don’t understand the behavior.

  • How to pass arguments to Shell Script through docker run
  • Can't access docker over the internet
  • Docker: I'm not able to make working a volume binding at runtime
  • File Not Found when running Laravel with Nginx using LaraDock
  • SkyDNS in Daemon Sets and local DNS resolution
  • “Unable to access jarfile” when trying to run a jar with docker
  • Any suggestions will be thankfully received.

  • Run Teampass in docker with a running nginx proxy
  • external access to kubernetes
  • kubernetes mysql chown operation not permitted
  • Docker when deployed on marathon is failing continously
  • Wercker crashes on MacOS with PANIC too many open files
  • Pushing to private docker registry fails
  • One Solution collect form web for “Docker swarm-manager displays old container information”

    The reason it exits is that the /bin/bash command completes and a Docker container only runs as long as its main process (if you run such a container with the -it flags the process will keep running while the terminal is attached).

    As to why the swarm manager thought the container was still running, I’m not sure. I guess there is a short delay while Swarm updates the status of everything.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.