Unable to start container

I’m new to docker and trying to implement docker using chef on centos 7.1
Below is the basic code I wrote for installing, pulling centos image and creating container.

All the 3 tasks are executing successfully. Since the containers are in stop mode I tried to start manually by typing docker start containerid. When I checked docker ps I found the container is not started . I tried for several times but couldn’t start the container.

  • Kubernetes NFS PersistentVolumeClaim has status Pending
  • Docker shows no containers or images after system reboot
  • How can I listen for signals from Docker in .Net Core Executable?
  • How to set password to a docker container
  • Docker container with ASP.NET Core libraries
  • docker running a data container from scratch
  • Docker code using chef

    docker_service 'default' do
      action [:create, :start]
    end
    
    docker_image 'centos' do
      action :pull
    end
    
    docker_container 'check2' do
      repo 'centos'
      action :create
    end
    

    Docker info:

    Containers: 6
     Running: 1
     Paused: 0
     Stopped: 5
    Images: 3
    Server Version: 1.12.1
    Storage Driver: devicemapper
     Pool Name: docker-8:1-523814-pool
     Pool Blocksize: 65.54 kB
     Base Device Size: 10.74 GB
     Backing Filesystem: xfs
     Data file: /dev/loop0
     Metadata file: /dev/loop1
     Data Space Used: 441.3 MB
     Data Space Total: 107.4 GB
     Data Space Available: 28.08 GB
     Metadata Space Used: 1.159 MB
     Metadata Space Total: 2.147 GB
     Metadata Space Available: 2.146 GB
     Thin Pool Minimum Free Space: 10.74 GB
     Udev Sync Supported: true
     Deferred Removal Enabled: false
     Deferred Deletion Enabled: false
     Deferred Deleted Device Count: 0
     Data loop file: /var/lib/docker/devicemapper/devicemapper/data
     WARNING: Usage of loopback devices is strongly discouraged for production use. Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.
     Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
     Library Version: 1.02.107-RHEL7 (2016-06-09)
    Logging Driver: json-file
    Cgroup Driver: cgroupfs
    Plugins:
     Volume: local
     Network: null host bridge overlay
    Swarm: inactive
    Runtimes: runc
    Default Runtime: runc
    Security Options: seccomp
    Kernel Version: 3.10.0-229.4.2.el7.x86_64
    Operating System: CentOS Linux 7 (Core)
    OSType: linux
    Architecture: x86_64
    CPUs: 4
    Total Memory: 6.807 GiB
    ID: R24R:ORHY:XJQW:2HNI:U5TV:UGF7:B7VX:P6Z6:UHSR:YIMR:VGJT:4URU
    Docker Root Dir: /var/lib/docker
    Debug Mode (client): false
    Debug Mode (server): false
    Registry: https://index.docker.io/v1/
    WARNING: bridge-nf-call-iptables is disabled
    WARNING: bridge-nf-call-ip6tables is disabled
    Insecure Registries:
     127.0.0.0/8
    

    Would you please help me

  • Container delivery on amazon ecs
  • gitlab-runner with docker executor cannot find official images like maven:3.3.9-jdk-8
  • Using docker on Mac. Is it possible to start docker daemon using docker-machine and pass in arguments?
  • How to install memcached in docker container
  • How to deploy using capistrano without current release symlink?
  • io.fabric8 docker-maven-plugin error: “No config type given”
  • One Solution collect form web for “Unable to start container”

    By default, the centos image will run /bin/bash which will exit immediately without a tty (-t) and standard input (-i) available.

    Try running something in the container

    docker_container 'check2' do
      repo 'centos'
      command 'top -b -d 5'
    end
    
    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.