# Cannot start docker containers

**URL:** <https://dietpi.com/forum/t/cannot-start-docker-containers/5821>\
**Category:** Troubleshooting\
**Created:** [14 October 2021 15:14 UTC](https://dietpi.com/forum/t/cannot-start-docker-containers/5821 "2021-10-14T15:14:30Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![ivenhov](https://dietpi.com/forum/user_avatar/dietpi.com/ivenhov/32/4632_2.png) [@ivenhov](https://dietpi.com/forum/u/ivenhov)\
**Post date:** [14 October 2021 15:14 UTC](https://dietpi.com/forum/t/cannot-start-docker-containers/5821/1 "2021-10-14T15:14:30Z")

</div>

Hi all

I’m on NanoPC-TV with dietpi migrated to bullseye.  
I’m trying to install docker and start a hello-world container.  
Upon installation via dietpi-software I get error

```nohighlight
Selecting previously unselected package docker-ce-cli.
(Reading database ... 46985 files and directories currently installed.)
Preparing to unpack .../docker-ce-cli_5%3a20.10.9~3-0~debian-bullseye_arm64.deb ...
Unpacking docker-ce-cli (5:20.10.9~3-0~debian-bullseye) ...
Selecting previously unselected package docker-ce.
Preparing to unpack .../docker-ce_5%3a20.10.9~3-0~debian-bullseye_arm64.deb ...
Unpacking docker-ce (5:20.10.9~3-0~debian-bullseye) ...
Setting up docker-ce-cli (5:20.10.9~3-0~debian-bullseye) ...
Setting up docker-ce (5:20.10.9~3-0~debian-bullseye) ...
Job for docker.service failed because the control process exited with error code.
See "systemctl status docker.service" and "journalctl -xe" for details.
invoke-rc.d: initscript docker, action "restart" failed.
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: activating (auto-restart) (Result: exit-code) since Thu 2021-10-14 14:59:58 BST; 33ms ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
    Process: 40474 ExecStart=/usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock (code=exited, status=1/FAILURE)
   Main PID: 40474 (code=exited, status=1/FAILURE)

Oct 14 14:59:58 DietPi systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Oct 14 14:59:58 DietPi systemd[1]: docker.service: Failed with result 'exit-code'.
Oct 14 14:59:58 DietPi systemd[1]: Failed to start Docker Application Container Engine.
dpkg: error processing package docker-ce (--configure):
 installed docker-ce package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 docker-ce
E: Sub-process /usr/bin/dpkg returned an error code (1)

```

I can however start service later using

```nohighlight
service docker start

root@DietPi:~# service docker status
● docker.service - Docker Application Container Engine
     Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
     Active: active (running) since Thu 2021-10-14 15:28:20 BST; 22min ago
TriggeredBy: ● docker.socket
       Docs: https://docs.docker.com
   Main PID: 45030 (dockerd)
      Tasks: 11
     Memory: 26.0M
     CGroup: /system.slice/docker.service
             └─45030 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Oct 14 15:28:20 DietPi dockerd[45030]: time="2021-10-14T15:28:20.452413178+01:00" level=info msg="Loading containers: done."
Oct 14 15:28:20 DietPi dockerd[45030]: time="2021-10-14T15:28:20.510148970+01:00" level=info msg="Docker daemon" commit=79ea9d3 graphdriver(s)=overlay2 version=20.10.9
Oct 14 15:28:20 DietPi dockerd[45030]: time="2021-10-14T15:28:20.510731428+01:00" level=info msg="Daemon has completed initialization"
Oct 14 15:28:20 DietPi systemd[1]: Started Docker Application Container Engine.
Oct 14 15:28:20 DietPi dockerd[45030]: time="2021-10-14T15:28:20.652845678+01:00" level=info msg="API listen on /run/docker.sock"
Oct 14 15:39:00 DietPi dockerd[45030]: time="2021-10-14T15:39:00.191039275+01:00" level=warning msg="Your kernel does not support cgroup namespaces. Cgroup namespace setting discarded."
Oct 14 15:39:00 DietPi dockerd[45030]: time="2021-10-14T15:39:00.392383608+01:00" level=error msg="stream copy error: reading from a closed fifo"
Oct 14 15:39:00 DietPi dockerd[45030]: time="2021-10-14T15:39:00.392588233+01:00" level=error msg="stream copy error: reading from a closed fifo"
Oct 14 15:39:00 DietPi dockerd[45030]: time="2021-10-14T15:39:00.521419150+01:00" level=error msg="41b3e2ac426a574a9ec1c915056e1eac9e1a31ab566febef23331ee99d2636ed cleanup: failed to delete container from containerd: no>
Oct 14 15:39:00 DietPi dockerd[45030]: time="2021-10-14T15:39:00.521791025+01:00" level=error msg="Handler for POST /v1.41/containers/41b3e2ac426a574a9ec1c915056e1eac9e1a31ab566febef23331ee99d2636ed/start returned error>
root@DietPi:~#

```

When I try to start a container I get following error

```nohighlight
root@DietPi:~# docker -D run --name hello-world hello-world
DEBU[0000] [hijack] End of stdout
docker: Error response from daemon: OCI runtime create failed: cgroup namespaces aren't enabled in the kernel: unknown.
ERRO[0000] error waiting for container: context canceled

```

How to fix this?

System

```nohighlight
root@DietPi:~# uname -a
Linux DietPi 4.4.126 #7 SMP Thu Jul 19 22:51:16 EST 2018 aarch64 GNU/Linux
root@DietPi:~# cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
NAME="Debian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
root@DietPi:~#

```

Some info

```nohighlight
root@DietPi:~# docker -v
Docker version 20.10.9, build c2ea9bc

root@DietPi:~# cat /proc/cgroups
#subsys_name hierarchy num_cgroups enabled
cpuset 0 111 1
cpu 0 111 1
cpuacct 0 111 1
blkio 0 111 1
memory 0 111 1
devices 0 111 1
freezer 0 111 1
net_cls 0 111 1
perf_event 0 111 1
net_prio 0 111 1
hugetlb 0 111 1
pids 0 111 1
debug 0 111 1
root@DietPi:~# mount | grep cgroup
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime)

```

---

_[View the full topic](https://dietpi.com/forum/t/cannot-start-docker-containers/5821)._
