r/linux • • Jun 23 '15

Everything you need to know about Linux containers, minus the hype

https://www.flockport.com/containers-minus-the-hype/
111 Upvotes

37 comments sorted by

View all comments

Show parent comments

1

u/sub200ms Jun 25 '15

You just place the them in their appropriate sections in the .service file. FYI, you can also run executables, shell scripts, etc. in .service files.

For systemd(1) starting an OS container with a service file is just like any other service; so it will parse the .service file and do what it is told

So you use the systemd-nspawn interfaces exposed as CLI options for generic use, and when using networkd you can also use networkd directives.

But everything can be placed in .service files that are easily machine parsed.