Chef-docker issue

Here is my recipe to create a container in docker, when I run 'chef-client', it creates a container but it stops even after starting serveral times.

docker_service 'default' do
  action [:create, :start]
end

docker_image 'python' do
  tag 'latest'
  action [:pull, :build_if_missing]
end

docker_container 'my_py1' do
  repo 'python'
  tag 'latest'
  action :run
end

I'm not too familiar with how chef does docker but glancing at your code it looks like it's running the Python container from Docker Hub. I think that Python image is not running any service, like a web server or anything. Since there's no service running, the container might be starting up and then exiting. If you choose another container like nginx or tomcat, you might get results. Hope that helps.