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.

  • How to create Dockerfile which installs Python 3 and nltk in a Ubuntu container?
  • How to use fluentd log driver on Elastic Beanstalk Multicontainer docker
  • Elastic beanstalk : load balancer DNS unreachable
  • docker: is it possible to run containers from an other container?
  • Docker container does not start on executing docker run command
  • Building a docker container: will it be public?
  • 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   
    

  • Get composer (php dependency manager) to run on a docker image build
  • How to avoid NoSuchMethodError in docker-client test program
  • What are differences between Docker and Octopus Deploy
  • Why docker login command saves unencrypted password on my computer?
  • How do I define the name of image built with docker-compose
  • ambassador pattern vs network alias pattern in docker
  • 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.