Host docker in LXD cu ZFS

Postat la Sun 12 January 2020 in tutoriale, lxd, lxc

Pentru a rula docker intr-un container LXD trebuie facuti urmatorii pasi:

lxc launch ubuntu:18.04 docker-host
lxc config set docker-host security.nesting true
lxc config set docker-host linux.kernel_modules overlay
lxc exec docker-host -- mkdir -p /lib/modules/`uname -r`/
lxc file push /lib/modules/`uname -r`/modules.dep.bin docker-host/lib/modules/`uname -r`/modules.dep.bin
lxc restart docker-host

Apoi putem instala docker normal in 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

Mai multe legat de LXD puteti gasi in seria de articole Virtualizare cu LXD