Docker Community Forums

Share and learn in the Docker community.

Docker is installed, but not able to run any docker images


(Abysubin) #1

Expected behavior

I have installed docker on an AWS EC2 instance running the Amazon Linux AMI. I had followed https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html for installing the docker. The installation was successful and docker Info is as follows:

Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 18.03.1-ce
Storage Driver: devicemapper
Pool Name: docker-202:1-1443627-pool
Pool Blocksize: 65.54kB
Base Device Size: 10.74GB
Backing Filesystem: xfs
Udev Sync Supported: true
Data file: /dev/loop0
Metadata file: /dev/loop1
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Data Space Used: 10.94MB
Data Space Total: 107.4GB
Data Space Available: 19.65GB
Metadata Space Used: 581.6kB
Metadata Space Total: 2.147GB
Metadata Space Available: 2.147GB
Thin Pool Minimum Free Space: 10.74GB
Deferred Removal Enabled: false
Deferred Deletion Enabled: false
Deferred Deleted Device Count: 0
Library Version: 1.02.135-RHEL7 (2016-11-16)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 773c489c9c1b21a6d78b5c538cd395416ec50f88
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
seccomp
_ Profile: default_
Kernel Version: 3.10.53-56.140.amzn1.x86_64
Operating System: Amazon Linux AMI 2018.03
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 7.059GiB
Name: ip-172-31-33-123
ID: XOVE:I42I:5SX7:C5G5:QGNF:IADC:RA2A:3223:HCWJ:6RA2:W6WG:QXCO
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use.
_ Use --storage-opt dm.thinpooldev to specify a custom block storage device._

Actual behavior

On this docker, ‘hello world’ application itself is not running. Tried to build the Docker image from your Dockerfile (by following the same url mentioned above). Al these are throwing the following error:

[ec2-user@ip-172-31-33-123 ~]$ docker build -t hello-world .

Sending build context to Docker daemon 17.07GB

Step 1/11 : FROM amazonlinux:2018.03

2018.03: Pulling from library/amazonlinux

28eb89314c9e: Extracting [==================================================>] 61.76MB/61.76MB

failed to register layer: devmapper: Error mounting ‘/dev/mapper/docker-202:1-1443627-5b75611b1a2f9d5de2394b15ca2c92707280b362532a5337c077952b361b0893’ on ‘/var/lib/docker/devicemapper/mnt/5b75611b1a2f9d5de2394b15ca2c92707280b362532a5337c077952b361b0893’ (fstype=‘xfs’ options=‘nouuid’): invalid argument

<4>[54607885.285735] [<ffffffff81070fc0>] ? kthread_create_on_node+0x120/0x120

<1>[54607885.288969] XFS (dm-1): Corruption detected. Unmount and run xfs_repair

<4>[54607885.292311] XFS (dm-1): SB validate failed with error 22.

Could you please help in identifying what is going wrong ? I am a newbie to docker and hence would appreciate a detailed response.


(Eldeberde) #2

Hi, has your user permission to write in /var/lib/docker??

Can you test it with sudo???

Regards