Raspbian docker: Error response from daemon: cgroups: memory cgroup not supported on this system: unknown
Asked Answered
M

3

8

I am new to docker, I plug my PI3 to test some stuff and I'm already facing an error, I can't figured that out myself.

So I freshly install raspbian and docker.

That's my install log

install log

Then I try the classic hello-word test

and there is the log

hello world test

Mayapple answered 27/11, 2017 at 22:10 Comment(0)
I
16

It looks 17.11.0 has the problem.

Could you try to install the old one as below ?

$ sudo apt install docker-ce=17.09.0~ce-0~raspbian

Or wait for the fix.

(2017.12.5)
It looks 2017-11-29-raspbian-stretch has same issue. To avoid upgrading by apt upgrade, Do:
sudo apt-mark hold docker-ce.
And unhold when it fixes.

Inflorescence answered 28/11, 2017 at 0:46 Comment(2)
I can confirm that this solution worked for me. RPi B+ v3 on 12/5/17.Laevorotatory
Working here. Waiting a notification for the unhold :)Peradventure
B
11

Another solution is to add cgroup_enable=memory cgroup_memory=1 in /boot/cmdline.txt at the end of the line and reboot.

Bury answered 7/12, 2017 at 9:49 Comment(3)
Could you elaborate a bit on the implications of this? What does it do? Are there any negative side effects to be expected?Schmo
It enables memory control groups, since now it will probably be required to run docker, or at least it's not a bug in docker, it's related to how kernel manages memory, isolates resources.Bury
This works on a brand new NOOBs based install with stretch. To be just a bit clearer, add these parameters to the end of the existing command line. Do not add them as a new line.Leghorn
E
0

Quick fix: please create a folder and mount using below command:

sudo mkdir /sys/fs/cgroup/systemd
sudo mount -t cgroup -o none,name=systemd cgroup /sys/fs/cgroup/systemd
Eatage answered 3/4, 2024 at 7:56 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.