Created
May 27, 2015 10:25
-
-
Save gboddin/331c490d26e39e6b3d2c to your computer and use it in GitHub Desktop.
systemd-containers-cheat-sheet
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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