[systemd-devel] [PATCH 1/1] Allow systemd to run without assigning container to machine.slice
Zbigniew Jędrzejewski-Szmek
zbyszek at in.waw.pl
Fri Jan 31 07:45:38 PST 2014
On Fri, Jan 31, 2014 at 10:00:12AM -0500, Daniel J Walsh wrote:
> My plan is not to have the user no they are running systemd-nspawn
>
> Imaging the user is creating a httpd container unit file using docker,
> described in this document.
>
> http://welldefinedbehaviour.wordpress.com/2014/01/30/adventures-with-containerization-fedora-docker-and-httpd/
>
>
> [Unit]
> Description=example.com Container
> After=docker.service
>
> [Service]
> Type=simple
> ExecStart=/usr/bin/docker run -v /srv/example.com:/srv httpd-test1
> Restart=on-failure
>
>
> Currently docker uses lxc tools under the covers to launch the container, we
> want to add a plugin to use systemd-nspawn.
>
> docker -> systemd-nspawn -> container
>
> But we want the docker, systemd-nspawn and the container all affected by any
> Cgroup entries in the unit file. So I want the container to run as a service
> slice not a machine slice.
And if you specify --slice=system-<something>.slice, doesn't this do the job?
Zbyszek
More information about the systemd-devel
mailing list