Skip to content

Instantly share code, notes, and snippets.

@gboddin
Created May 27, 2015 10:25
Show Gist options
  • Save gboddin/331c490d26e39e6b3d2c to your computer and use it in GitHub Desktop.
Save gboddin/331c490d26e39e6b3d2c to your computer and use it in GitHub Desktop.
systemd-containers-cheat-sheet
# bootstrap a rpm based distro :
yum -y --releasever=19 --nogpg --installroot=/srv/mycontainer --disablerepo='*' --enablerepo=fedora install systemd passwd yum fedora-release vim-minimal
systemd-nspawn -bD /srv/mycontainer
# bootstrap a deb based distro :
debootstrap --arch=amd64 unstable ~/debian-tree/
systemd-nspawn -D ~/debian-tree/
# bootstrap an arch based distro :
pacstrap -c -d ~/arch-tree/ base
systemd-nspawn -bD ~/arch-tree/
# enter a container :
nsenter -m -u -i -n -p -t $PID
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment