Docker Community Forums

Share and learn in the Docker community.

Overlay2 with backing file system "tmpfs " supported or not

While running docker stable binaries on my embedded device, storage driver is overlay2 and backing file system is tmpfs. While going through the documentation, I found that Overlay2 is not supported with tmpfs .

If its not then please suggest how to change it. By default backing file system is tmpfs.

I am having issues while running docker hello-world. So, please suggest.

docker info

DEBU[2021-03-11T14:22:55.186469164+01:00] Calling HEAD /_ping
DEBU[2021-03-11T14:22:55.188075665+01:00] Calling GET /v1.40/info
Debug Mode: false

Containers: 3
Running: 0
Paused: 0
Stopped: 3
Images: 1
Server Version: 19.03.15
Storage Driver: overlay2
Backing Filesystem: tmpfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: ea765aba0d05254012b0b9e595e995c09186427f
runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
init version: fec3683
Security Options:
Profile: default
Kernel Version: 5.10.8
Operating System: debian 18.04.4
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.827GiB
Name: EAGLE-CEF483654FB2
Docker Root Dir: /var/lib/docker
Debug Mode: true
File Descriptors: 27
Goroutines: 41
System Time: 2021-03-11T14:22:55.193007501+01:00
EventsListeners: 0
Experimental: true
Insecure Registries:
Live Restore Enabled: false
Product License: Community Engine

This is the error:

Handler for POST /v1.24/containers/create returned error: error creating aufs mount to /var/lib/docker/aufs/mnt c549130a63857658f8675fd84296afae46293a9f7ae54e9ee04e83c231db600f-init: invalid argument
aufs storage driver with overlayfs backing filesystem works. For now it seems like the only option, however I’m not satisfied with the solution, because it looks like a hack to me and because aufs is not in mainline kernel so I needed to compile the kernel myself.

This is how I did it (it’s quite a hack, please advice me to do it better):

on my PC:

git clone cd rpi-kernel
$ vagrant up
…wait some quite long time…

vagrant ssh cp /var/kernel_build/results/kernel-20161003-100112/rpi2_3/kernel7.img /vagrant/
exit sudo cp kernel7.img /mnt
then on the SD card:

mv /var/lib/docker /var/lib/docker~

mkdir -p /var/lib/docker /tmp/docker /tmp/work

mount -t overlay -o lowerdir=/var/lib/docker~,upperdir=/tmp/docker,workdir=/tmp/work overlay /var/lib/docker

docker daemon --storage-driver aufs