Score:0

systemd-nspawn - run a host binary with network isolation

us flag

I am trying to run a binary sitting on the host machine using systemd-nspawn with networking support. I am trying to run multiple copies of the binary where each instance would have its IP address.

I tried various networking options like --network-veth, --network-zone etc. While these options are setting up the necessary veth pairs and bridge devices etc, the container doesn't seem to be getting an IP address. I have read that for the container to get an IP, we should be running systemd-networkd inside the container. Considering I am running a binary, this isn't possible.

Is there any other way to achieve this, other than manually setting up the interfaces and assigning IP's etc.

I know this is supported out of the box by docker, but the problem is, docker depends on an image, and I would really love to do this with something other than docker.

NOTE: I have achieved this manually by creating network namespaces, bridges and running the process inside the namespace etc. But in search of out of the box solutions, if any.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.