GitLab: Docker CI pipeline
Optinal: Create nested LXD container
http://www.panticz.de/lxd/nesting
CONTAINER_NAME=gitlab-runner1-dev lxc launch ubuntu:18.04 ${CONTAINER_NAME} -p disk-zfs -p nic-dev-mgmt -c boot.autostart=true -c security.nesting=true -c security.privileged=true #-c volatile.dev-mgmt.hwaddr=00:11:22:33:44:55 lxc exec ${CONTAINER_NAME} -- apt update lxc exec ${CONTAINER_NAME} -- apt dist-upgrade lxc exec ${CONTAINER_NAME} -- apt purge -y lxd lxd-client snapd unattended-upgrades lxc exec ${CONTAINER_NAME} -- apt autoremove lxc file push /root/.ssh/authorized_keys ${CONTAINER_NAME}/root/.ssh/authorized_keys lxc exec ${CONTAINER_NAME} -- bash -c "sed -i 's/eth0:/dev-mgmt:/g' /etc/netplan/50-cloud-init.yaml" lxc exec ${CONTAINER_NAME} -- netplan apply printf 'lxc.apparmor.profile = unconfined\nlxc.cgroup.devices.allow = a\nlxc.mount.auto=proc:rw sys:rw\nlxc.cap.drop=' | lxc config set ${CONTAINER_NAME} raw.lxc - lxc restart ${CONTAINER_NAME}
Install Docker inside LXD container
# http://www.panticz.de/install-docker