Lessons Learned from Building a systemd-nspawn Container

A practical journey through containers, networking, and Linux internals

Section 1

You tried to build a container the honest way

You chose systemd-nspawn, not Docker. That matters:

You created a container root filesystem and tried to bootstrap Arch + nginx into it.

Reality check: it immediately failed because your root partition was full. That wasn’t a container problem — that was disk accounting.

Section 2

You hit real storage limits (and didn’t ignore them)

You discovered:

Core lessons:

You also learned why live USBs exist, why mounted partitions resist resizing, and why LVM exists to reduce friction.

Section 3

You met systemd’s sharp edges

systemd-networkd refused to start because it was masked.

This was a deliberate desktop networking policy — not random failure.

Section 4

Host vs container separation

You started systemd-networkd on the host while NetworkManager managed Wi-Fi.

Result: network conflict.

This separation clarified system boundaries.

Section 5

Manual container networking

--network-veth only creates a link — configuration is manual.

Only then did the container gain connectivity.

Section 6

DNS debugging fundamentals

IP connectivity worked. Domains didn’t.

Name resolution restored full connectivity.

Section 7

The finished system

You built a container with its own:

This clarified how abstractions hide complexity — and how Linux actually behaves.

Reflection

The deeper outcome

This wasn’t just setup — it was systems thinking in action.