Differences between revisions 1 and 2
Revision 1 as of 2017-10-24 16:47:04
Size: 897
Comment:
Revision 2 as of 2017-10-24 17:01:40
Size: 1068
Comment:
Deletions are marked like this. Additions are marked like this.
Line 26: Line 26:
root@FreedomBox:~# halt root@FreedomBox:~# ^D
Line 32: Line 32:

# To stop the container, either issue:
$ sudo machinectl stop FreedomBox

# or log in and run "halt". Simply logging out does not stop a container started with "-b"

systemd containers

systemd-nspawn and machinectl are lightweight container management tools.

They are deployed as part of systemd with the systemd-container package.

Usage example

Deploy FreedomBox on a Sid container. This will take around 1.2 GB of disk space.

# create a new container using debootstrap
$ CDIR=/var/lib/machines/freedombox
$ sudo debootstrap sid $CDIR
$ sudo systemd-nspawn -D $CDIR --machine FreedomBox
root@FreedomBox:~# apt-get install -y freedombox-setup

# workaround for #862758
root@FreedomBox:~# apt-get install -y gir1.2-nm-1.0

# set root password and stop the container
root@FreedomBox:~# passwd root
root@FreedomBox:~# ^D

# start the container and its services
$ sudo systemd-nspawn -D $CDIR --machine FreedomBox -b

# Browse to https://127.0.0.1/

# To stop the container, either issue:
$ sudo machinectl stop FreedomBox

# or log in and run "halt". Simply logging out does not stop a container started with "-b"