Taming systemd-nspawn for running containers ############################################ :date: 2015-11-09 12:52 :slug: taming_systemd_nsapwn :tags: systemd-nspawn, containers, debian :author: copyninja :summary: Brief notes on maintaining container using systemd-nspawn I've been trying to run containers using systemd-nspawn for quite some time. I was always bumping to one or other dead end. This is not systemd-nspawn's fault, rather my impatience stopping me from reading manual pages properly lack of good tutorial like article available online. Compared to this LXC has a quite a lot of good tutorials and howto's available online. This article is my effort to create a notes putting all required information in one place. Creating a Debian Base Install ============================== First step is to have a minimal Debian system some where on your hard disk. This can be easily done using *debootsrap*. I wrote a custom script to avoid reading manual every time I want to run debootstrap. Parts of this script (mostly packages and the root password generation) is stolen from *lxc-debian* template provided by lxc package. .. code-block:: shell #!/bin/sh set -e set -x usage () { echo "${0##/*} [options] []" echo "Bootstrap rootfs for Debian" echo cat <