When restart docker.io service,some docker containers don't start

When I restart the docker service by using the command:

service docker.io restart

Then I found some docker containers don’t start normally and I also cannot found docker logs in /var/log.
could you help me?
Any suggestions appreciated.

  • Sails application cannot accessed from web browser. Connection refused
  • bash regular expressions to get docker container port number
  • Creating a multi node Kubernetes Cluster for a stateless webapp
  • Run tests using Jenkins in a Docker Container
  • Docker mysql instant exit
  • OpenVSwitch in container with IP-Tables
  • such as :

    I had 5 dockers at the beginning,

    root@docker:/home/ubuntu# docker ps
    CONTAINER ID        IMAGE                       COMMAND                CREATED              STATUS              PORTS                                                                         NAMES
    a841626ed335        ubuntu:14.04                /bin/bash              11 seconds ago       Up 10 seconds       0.0.0.0:809->80/tcp                                                           dreamy_elion         
    b346335ed23b        ubuntu:14.04                /bin/bash              41 seconds ago       Up 40 seconds       0.0.0.0:889->80/tcp                                                           jolly_perlman        
    da73442544c9        ubuntu:14.04                /bin/bash              About a minute ago   Up About a minute   0.0.0.0:888->80/tcp                                                           silly_davinci        
    bd6100c48b0a        shipyard/rethinkdb:latest   /usr/bin/rethinkdb -   17 hours ago         Up About a minute   0.0.0.0:49153->28015/tcp, 0.0.0.0:49154->29015/tcp, 0.0.0.0:49155->8080/tcp   shipyard-rethinkdb   
    a258b27bb0b7        web-801:latest              /usr/sbin/apache2ctl   26 hours ago         Up About a minute   433/tcp, 0.0.0.0:802->80/tcp                                                  container-802        
    

    Then I restarted the service

    root@docker:/home/ubuntu# service docker.io restart
    docker.io stop/waiting
    docker.io start/running, process 23046
    

    After the restart,only 3 dockers left…

    root@docker:/home/ubuntu# docker ps
    CONTAINER ID        IMAGE                       COMMAND                CREATED             STATUS              PORTS                                                                         NAMES
    da73442544c9        ubuntu:14.04                /bin/bash              2 minutes ago       Up About a minute   0.0.0.0:888->80/tcp                                                           silly_davinci        
    bd6100c48b0a        shipyard/rethinkdb:latest   /usr/bin/rethinkdb -   17 hours ago        Up About a minute   0.0.0.0:49153->28015/tcp, 0.0.0.0:49154->29015/tcp, 0.0.0.0:49155->8080/tcp   shipyard-rethinkdb   
    a258b27bb0b7        web-801:latest              /usr/sbin/apache2ctl   26 hours ago        Up About a minute   433/tcp, 0.0.0.0:802->80/tcp                                                  container-802   
    

  • can we convert a live server to docker image
  • sha256sum error while building nvidia-docker on ppc64le
  • docker vs docker-compose nginx: [emerg] host not found in upstream “httpstat.us” in /etc/nginx/nginx.conf:21
  • docker-compose.yml invalid: app.build contains an invalid type, it should be a string
  • Golang Microservices can't communicate using Docker for Mac
  • Container spawning for interactive tutorial
  • One Solution collect form web for “When restart docker.io service,some docker containers don't start”

    Restarting Docker means doing Ctrl d for a container that was launched with a basic

    docker run -it ubuntu:latest bash

    So you have do start it again

    If you do

    docker start a841626ed335

    and then

    docker attach a841626ed335

    You will be back in the first container.

    If you run a daemonized container with

    docker run -d ubuntu:latest /bin/sh -c "while true; do echo hi; sleep 3; done"

    It will restart automatically

    I think

    docker ps -a

    would show

    exit 0

    for the 2 “missing” containers

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