WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Dockerd on Tiny Core 8.0 x86 -- "overlay" not a supported filesystem  (Read 12065 times)

Offline paulscode

  • Newbie
  • *
  • Posts: 8
QUESTION

When I attempt to run the Docker Daemon in Tiny Core 8.0, it generates an error stating that 'overlay' is not a supported filesystem on the host.  Is there a package that can be installed which will meet this dependency?  Searching for the term "overlay" in the Apps cloud did not return any obvious results.

ADDITIONAL DETAILS

I have build 32bit versions of Docker Daemon and Docker Client following the instructions described HERE.  I have tested and verified that they function properly on Alpine x86.  I am now attempting to configure Tiny Core 8.0 x86 to run these, as it is lighter-weight and much faster boot-up.

For my test environment, I installed Tiny Core x86 in VirtualBox from the CorePlus-8.0.iso image, with options: "Frugal", "Whole Disk", "sda", "Install Boot Loader", "ext4", "Core and X/GUI Desktop".

After booting up for the first time, I then ran the following commands to install dependencies and set up the environment:

Code: [Select]
tce-load -wi bash git procps xz ca-certificates iptables net-bridging-4.8.17-tinycore

sudo ln -s /usr/local/etc/ssl /etc/ssl

sudo addgroup docker
sudo addgroup tc docker

echo "etc/passwd" >> /opt/.filetool.lst
echo "etc/group" >> /opt/.filetool.lst
echo "etc/shadow" >> /opt/.filetool.lst
echo "etc/gshadow" >> /opt/.filetool.lst
echo "etc/profile.d" >> /opt/.filetool.lst
echo "etc/ssl" >> /opt/.filetool.lst

echo "#!/bin/bash" >> /etc/profile.d/paths.sh
echo "export PATH=\$PATH:/home/tc/dockerd:/home/tc/docker" >> /etc/profile.d/paths.sh
chmod 755 /etc/profile.d/paths.sh

cd ~
mkdir dockerd
mkdir docker

cd ~/dockerd
wget http://www.paulscode.com/downloads/dockerd.zip
unzip dockerd.zip

wget https://raw.githubusercontent.com/tianon/cgroupfs-mount/master/cgroupfs-mount
chmod 755 cgroupfs-mount

cd ~/docker
wget http://www.paulscode.com/downloads/docker.zip
unzip docker.zip

After rebooting, I am then able to launch the Docker Daemon without it crashing:
Code: [Select]
sudo cgroupfs-mount
sudo dockerd


As you can see from the output, although the Docker Daemon runs, there is an error stating that 'overlay' is not a supported filesystem on the host.

When I run a simple test:
Code: [Select]
docker run -it 32bit/ubuntu:16.04 /bin/echo Hello World

Docker crashes with a message about insufficient disk space.  Since the same test works on Alpine x86, I suspect the problem is related to the error about 'overlay' filesystem.  I would like to address this error first to rule it out as the cause.

For reference, output of the same test on Alpine x86.  As you can see, it is nearly identical to the output from TinyCore, but doesn't have the error about 'overlay' filesystem:


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
As per: http://tinycorelinux.net/8.x/x86/release/src/kernel/config-4.8.17-tinycore

Code: [Select]
# CONFIG_OVERLAY_FS is not set
..so you'll need to recompile the kernel

Offline paulscode

  • Newbie
  • *
  • Posts: 8
Excellent, thanks for the help!

Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
It seems to me that the docker model of apps in containers on one kernel is a lot like the hypervisor type 1 model of VMs, except that in theory the containers are smaller than VM's. This might be true if the VM's are running Windows or Ubuntu or RHEL or SLES, but if the VM's are TC then that difference mostly goes away. You're left with the host OS of docker which unless it's TC then it's bigger than ESXi for example. Recompiling the kernel to support docker on TC might solve that problem, but it seems like the separation might still be better in VM's. It sounds like a lot of work for what might turn out to be a wash resource wise.

After all that I would also like to see overlayfs support, but for a different reason. I'd also like to see TC based on LTS kernels too, but I digress...

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
andyj: clearly containers and VMs have overlapping but still different use cases

Offline paulscode

  • Newbie
  • *
  • Posts: 8
I apologize for the dumb questions, but this is my first experience building a kernel.  I made the config changes and built the tinycore kernel, but now not sure what the next steps should be.  If I have a tinycore installation, how to I replace the vanilla kernel with this modified one?

For reference, here is the process I followed to build the kernel:

I began by spinning up a fresh 32bit Ubuntu image, and installed build-dep libncurses5-dev and libncursesw5-dev

Then I ran the following commands:

Code: [Select]
wget http://tinycorelinux.net/8.x/x86/release/src/kernel/linux-4.8.17-patched.txz
wget http://tinycorelinux.net/8.x/x86/release/src/kernel/config-4.8.17-tinycore
tar -xvf linux-4.8.17-patched.txz
cp config-4.8.17-tinycore linux-4.8.17/.config
cd linux-4.8.17

gedit .config
    CONFIG_OVERLAY_FS=y
    # (plus these two to address some of the other dockerd warnings)
    CONFIG_MEMCG=y
    CONFIG_CFS_BANDWIDTH=y

make oldconfig
make menuconfig
make bzImage

This eventually completes with the message "Kernel: arch/x86/boot/bzImage is ready".  At this point I am not sure what to do next.  Do I just need to take that file and overwrite its counterpart on the existing tinycore installation, or are there other steps?

Offline andyj

  • Hero Member
  • *****
  • Posts: 1036
The bzImage file you made in linux-4.8.17/arch/x86/boot is your kernel. Copy it to your system's boot directory with the other kernels (renaming it as necessary) and copy the existing menu entry in your boot loader for TC to make a new entry using your new kernel. You shouldn't have to change any other entries. You can use the same rootfs and modules. I wouldn't overwrite an existing working entry, but that depends on your confidence level. Good luck.
« Last Edit: May 21, 2017, 02:52:18 PM by andyj »

Offline paulscode

  • Newbie
  • *
  • Posts: 8
Thanks again for the help.  Booting with the new kernel generates a lot of error messages and freezes.  The messages zoom by too fast to read, and I can't scroll back up to see them.  I'll try and rebuild the kernel without any config changes, to rule out problems with the build process.  I'll also see if I can take a video of the VM as it is booting up and step through the frames to try and read the error messages.

For reference, I used the following commands to add the new kernel to the boot directory:

Code: [Select]
cd /mnt/sda1/tce/boot
wget http://www.paulscode.com/downloads/bzImage
chmod 664 bzImage
cd extlinux
vi extlinux.conf

I edited extlinux.conf like so:

Code: [Select]
DEFAULT bzim
LABEL core
KERNEL /tce/boot/vmlinuz
INITRD /tce/boot/core.gz
APPEND quiet  waitusb=5:UUID="fee3c2ac-3bf2-4aa1-ae8e-73fa95f4ea2c" tce=UUID="fee3c2ac-3bf2-4aa1-ae8e-73fa95f4ea2c"
LABEL bzim
KERNEL /tce/boot/bzImage
INITRD /tce/boot/core.gz
APPEND quiet  waitusb=5:UUID="fee3c2ac-3bf2-4aa1-ae8e-73fa95f4ea2c" tce=UUID="fee3c2ac-3bf2-4aa1-ae8e-73fa95f4ea2c"

Offline paulscode

  • Newbie
  • *
  • Posts: 8
Building the kernel with no config changes was successful, so I built it with only the CONFIG_OVERLAY_FS parameter set (without the other two config changes).  This build booted up successfully, and the Docker Daemon starts without errors.

There are some new errors to fix when I try to launch the Docker Client, but I'll mark this thread as solved since the "overlay not a supported filesystem" issue is resolved.

Offline dcyran

  • Newbie
  • *
  • Posts: 2
hi
my small imput: as I understand, alpine x86 is compiled with musl -not libc (TinyCore and most distributions).  This could be one more factor for the issues.

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: Dockerd on Tiny Core 8.0 x86 -- "overlay" not a supported filesystem
« Reply #10 on: May 23, 2017, 07:19:26 AM »
deyran: no, the only interface between the container "guest" and the host is through the kernel. we don't use the host's libc inside the container and musl can be used just fine.

Offline fengzhibin

  • Newbie
  • *
  • Posts: 3
Re: Dockerd on Tiny Core 8.0 x86 -- "overlay" not a supported filesystem
« Reply #11 on: February 27, 2018, 09:56:36 AM »
I am a Linux novice, can you tell me how to recompile the kernel? I want to recompile the kernel of x86_64's corepure, or can I have a tutorial to point it out

As per: http://tinycorelinux.net/8.x/x86/release/src/kernel/config-4.8.17-tinycore

Code: [Select]
# CONFIG_OVERLAY_FS is not set
..so you'll need to recompile the kernel

Offline fengzhibin

  • Newbie
  • *
  • Posts: 3
Re: Dockerd on Tiny Core 8.0 x86 -- "overlay" not a supported filesystem
« Reply #12 on: February 27, 2018, 09:59:12 AM »
Can you share how to recompile the kernel? When I install docker, I also encounter the same confusion as you, and I need a x86_64 bit system. I also need to install docker-compose. But I have to run dockerd first, so I also need to recompile the kernel to open CONFIG_OVERLAY_FS

Excellent, thanks for the help!

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14815
Re: Dockerd on Tiny Core 8.0 x86 -- "overlay" not a supported filesystem
« Reply #13 on: February 27, 2018, 10:55:53 AM »
Using:
http://repo.tinycorelinux.net/9.x/x86_64/release/src/kernel/linux-4.14.10-patched.txz
http://repo.tinycorelinux.net/9.x/x86_64/release/src/kernel/config-4.14.10-tinycore64

..something like this:
Code: [Select]
$ tce-load -i compiletc perl5 bash ncurses-dev bc advcomp glibc_apps

$ cd linux-4.14.10

$ make mrproper
$ cp ../config-4.14.10-tinycore64 .config
$ make oldconfig

..then use "make menuconfig" to make your changes and, once done, "make"

Offline fengzhibin

  • Newbie
  • *
  • Posts: 3
Re: Dockerd on Tiny Core 8.0 x86 -- "overlay" not a supported filesystem
« Reply #14 on: February 27, 2018, 11:19:45 PM »
OK, thank you. I want to integrate the new kernel into the ISO image. Do I follow this document? http://wiki.tinycorelinux.net/wiki:remastering