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.

  • Unable to connect to published Docker port on OS X
  • Share container definition in multiple docker compose
  • AWS latency spike during fix hours
  • Networking setup in docker
  • Running 32bit LXC on 64 bit host machine?
  • How to get the dockerTag label via the Artifactory API?
  • 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

  • Creating a running Postgres service inside a docker container
  • Docker error : no space left on device
  • Docker + Jenkins + AWS
  • docker-compose get ID of a docker
  • debugging containerised python web app
  • Slow codeception coverage in docker
  • 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.