Error response from daemon: Container f88566c370dd is not running
<p>I am observing the below error while I execute the below command.</p>
<blockquote>
<p>cmd used- <code> docker exec -it f88566c370dd /bin/bash</code>
error observed- <code>Error response from daemon: Container f88566c370dd is not running</code></p>
</blockquote>
<p>I am trying to execute a Chef recipe from a VM to pull an image and run three CentOS containers.</p>
<h3>Chef recipe</h3>
<pre><code>#
# Cookbook Name:: chef-docker
# Recipe:: default    #
# Copyright 2016, SONATA_SOFTWARE    #
# All rights reserved - Do Not Redistribute
#
docker_service 'default' do
  action [:create, :start]
end

# Pull latest image
docker_image 'centos' do
  tag 'latest'
  action :pull
end

# Run container
docker_container 'first' do
  repo 'centos'
  command 'ls -la /'
  end

  docker_container 'second' do
  repo 'centos'
  command 'ls -la /'
  end

  docker_container 'third' do
  repo 'centos'
  command 'ls -la /'
  end
</code></pre>
<p>Command used in VM to execute chef recipe</p>
<pre><code>chef-client -r recipe[chef-docker::Default]
</code></pre>
<p>Expected Result: Installation of software such as Java, Python, or tools such as Jenkins and Tomcat in containers.</p>
<pre><code>[root@sonatadocker ~]# docker images
REPOSITORY          TAG                 IMAGE ID            CREATED                                                 VIRTUAL SIZE
centos              latest              97cad5e16cb6        3 weeks ago                                             196.5 MB

[root@sonatadocker ~]# docker ps -a
CONTAINER ID        IMAGE               COMMAND             CREATED             STATUS                    PORTS               NAMES
f88566c370dd        centos:latest       &quot;ls -la /&quot;          18 hours ago        Exited (0) 17 hours ago                       third
fdc12e9f65a9        centos:latest       &quot;ls -la /&quot;          18 hours ago        Exited (0) 17 hours ago                       second
604f0eba7010        centos:latest       &quot;ls -la /&quot;          18 hours ago        Exited (0) 17 hours ago                       first
</code></pre>