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 security.privileged true
lxc config set docker-host linux.kernel_modules 'ip_tables,ip6_tables,netlink_diag,nf_nat,overlay'
lxc config device add docker-host aadisable disk source=/dev/null path=/sys/module/nf_conntrack/parameters/hashsize
lxc config device add docker-host aadisable1 disk source=/dev/null path=/sys/module/apparmor/parameters/enabled
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