0

Has anyone gotten overlayroot and docker to work together? I'm running Ubuntu 18.04.3LTS and docker daemon won't start up.

Specifically:

sudo apt-get install docker.io overlayroot

sudo docker ps #works, no errors.

Edit /etc/overlayroot.conf to change: overlayroot="" to overlayroot="tmpfs"

sudo update-initramfs -u

sudo reboot #to reboot into the read only overlay filesystem

sudo docker ps # Get the following error:

Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?

ps: to remove the overlay filesystem do the following:

sudo overlayroot-chroot

Edit that same file to put it back to the original.

sudo update-initramfs -u

exit #to exit the chroot environment

sudo reboot #your system is back to a normal read/write Ubuntu system and "sudo docker ps" works again.

1 Answer 1

0

Solved my own problem.

Docker uses an overlay2 file system in /var/lib/docker. An overlay2 filesystem cannot be used on an overlay file system that overlayroot uses. It can however reside on it as regular files. So my solution was to: make a copy of /var/lib/docker/overlay2. Mount a tmpfs on /var/lib/docker/overlay2 On boot - copy that copy of /var/lib/docker/overlay2 to that tmpfs. Start up docker. Docker now sees it on an tmpfs, not an overlay file system.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .