Docker Community Forums

Share and learn in the Docker community.

Docker doesn;t start inside a docker container

Hello,

I am tyring to install docker inside a docker container, so i pulled a centos7 image and enabled systemd in it.

So i created a container from the image and then tried to install docker manually in it.

However for some reasons i am not able to start the docker service, Here is output of the commands from the container

systemctl start docker

Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.

systemctl status docker

● docker.service - Docker Application Container Engine
   Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; vendor preset: disabled)
  Drop-In: /etc/systemd/system/docker.service.d
           └─override.conf
   Active: failed (Result: exit-code) since Tue 2020-12-15 10:27:16 UTC; 23s ago
     Docs: https://docs.docker.com
  Process: 574 ExecStart=/usr/sbin/dockerd -H unix:// $DOCKER_OPTS (code=exited, status=203/EXEC)
 Main PID: 574 (code=exited, status=203/EXEC)

Dec 15 10:27:16 c16893d50c15 systemd[1]: docker.service: Service RestartSec=2s expired, scheduling restart.
Dec 15 10:27:16 c16893d50c15 systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Dec 15 10:27:16 c16893d50c15 systemd[1]: Stopped Docker Application Container Engine.
Dec 15 10:27:16 c16893d50c15 systemd[1]: docker.service: Start request repeated too quickly.
Dec 15 10:27:16 c16893d50c15 systemd[1]: docker.service: Failed with result 'exit-code'.
Dec 15 10:27:16 c16893d50c15 systemd[1]: Failed to start Docker Application Container Engine.

dockerd --debug

INFO[2020-12-15T10:28:08.589710537Z] Starting up
DEBU[2020-12-15T10:28:08.590585826Z] Listener created for HTTP on unix (/var/run/docker.sock)
DEBU[2020-12-15T10:28:08.591290544Z] Golang's threads limit set to 56070
INFO[2020-12-15T10:28:08.591784686Z] parsed scheme: "unix" module=grpc
INFO[2020-12-15T10:28:08.591807273Z] scheme "unix" not registered, fallback to default scheme module=grpc
DEBU[2020-12-15T10:28:08.591814663Z] metrics API listening on /var/run/docker/metrics.sock
INFO[2020-12-15T10:28:08.591843833Z] ccResolverWrapper: sending update to cc: [{unix:///run/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}  module=grpc
INFO[2020-12-15T10:28:08.591955801Z] ClientConn switching balancer to "pick_first"  module=grpc
INFO[2020-12-15T10:28:08.593614061Z] parsed scheme: "unix"                         module=grpc
INFO[2020-12-15T10:28:08.593646287Z] scheme "unix" not registered, fallback to default scheme  module=grpc
INFO[2020-12-15T10:28:08.593672812Z] ccResolverWrapper: sending update to cc: {[{unix:///run/containerd/containerd.sock  <nil> 0 <nil>}] <nil> <nil>}  module=grpc
INFO[2020-12-15T10:28:08.593683296Z] ClientConn switching balancer to "pick_first"  module=grpc
DEBU[2020-12-15T10:28:08.594523308Z] Using default logging driver json-file
DEBU[2020-12-15T10:28:08.594622712Z] [graphdriver] priority list: [btrfs zfs overlay2 fuse-overlayfs aufs overlay devicemapper vfs]
DEBU[2020-12-15T10:28:08.594661302Z] processing event stream                       module=libcontainerd namespace=plugins.moby
DEBU[2020-12-15T10:28:08.604556675Z] backingFs=xfs, projectQuotaSupported=false, indexOff="index=off,"  storage-driver=overlay2
INFO[2020-12-15T10:28:08.604588162Z] [graphdriver] using prior storage driver: overlay2
DEBU[2020-12-15T10:28:08.604606372Z] Initialized graph driver overlay2
DEBU[2020-12-15T10:28:08.610134017Z] No quota support for local volumes in /var/lib/docker/volumes: Filesystem does not support, or has not enabled quotas
DEBU[2020-12-15T10:28:09.564927998Z] Cleaning up old mountid : start.
failed to start daemon: error while opening volume store metadata database: timeout

docker info

Client:
 Context:    default
 Debug Mode: false
 Plugins:
  app: Docker App (Docker Inc., v0.9.1-beta3)
  buildx: Build with BuildKit (Docker Inc., v0.5.0-docker)

Server:
ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
errors pretty printing info