Error while installing docker on lxc container with zfs storage pool

hi,
I am trying to install docker in lxc container with security.privileged and security.nesting options as true. it is showing error of
service error message
docker.service - Docker Application Container Engine
Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Mon 2019-01-28 10:10:38 UTC; 33s ago
Docs: https://docs.docker.com
Process: 681 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
Main PID: 681 (code=exited, status=1/FAILURE)

Jan 28 10:10:38 kmaster systemd[1]: docker.service: Failed with result ‘exit-code’.
Jan 28 10:10:38 kmaster systemd[1]: docker.service: Service hold-off time over, scheduling restart.
Jan 28 10:10:38 kmaster systemd[1]: Stopped Docker Application Container Engine.
Jan 28 10:10:38 kmaster systemd[1]: docker.service: Start request repeated too quickly.
Jan 28 10:10:38 kmaster systemd[1]: Failed to start Docker Application Container Engine.
Jan 28 10:10:38 kmaster systemd[1]: docker.service: Unit entered failed state.
Jan 28 10:10:38 kmaster systemd[1]: docker.service: Failed with result ‘start-limit-hit’.
Jan 28 10:11:03 kmaster systemd[1]: docker.service: Start request repeated too quickly.
Jan 28 10:11:03 kmaster systemd[1]: Failed to start Docker Application Container Engine.
Jan 28 10:11:03 kmaster systemd[1]: docker.service: Failed with result ‘start-limit-hit’.

Is there any way to install docker in lxc container with zfs storage

Hi!

Is this on LXC or LXD?

Docker on LXD requires only security.nesting and not security.privileged.
I think there are other error messages that are not shown above.

Here is how I run Docker on LXD. At the end, hello-world should be running for you.

# Προετοιμασία του container (τα τρέχουμε στο host)
lxc launch ubuntu:18.04 docker
lxc config set docker security.nesting true
lxc config set docker linux.kernel_modules overlay
lxc exec docker -- mkdir -p /lib/modules/`uname -r`/
lxc file push /lib/modules/`uname -r`/modules.dep.bin docker/lib/modules/`uname -r`/modules.dep.bin
lxc restart docker

# Εγκατάσταση του Docker και εκτέλεση του hello-world (τα τρέχουμε μέσα στο container)
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
sudo apt install docker-ce
sudo docker run hello-world

What storage driver is docker using in your case? For me it’s still vfs, doing exactly the same.

By default, the Docker Storage driver on Ubuntu is “aufs”.
Docker suggest that not to use “vfs” storage driver in Production, It recommends to use in development and production environments.