Nspawn 3.0: A Docker-compatible Engine API for systemd-nspawn containers
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
Nspawn 3.0 adds a Docker Engine API on the host at /run/nspawn/api.sock, so the docker CLI and tools such as GitLab Runner's docker executor can manage systemd-nspawn machines. Access goes through polkit, and a user with org.nspawn.manage is effectively root. A machine mounting the socket read-write can now create and remove containers, where 2.0.0 was read-only. Image builds, pushes, tags and commits return 501, so docker build does not work. The supported API versions and the GitLab Runner setup are the author's claims and were not independently verified.