Question

Docker claims that containers built with it are more portable than pure LXC containers. I think I understand that there are some conventions and automation of the LXC configuration like for hostname and network configuration. But is there more than that?

Was it helpful?

Solution

If you take a LXC container (and its configuration file), it will be portable only if you run it on a host with the same network configuration; i.e. a bridge with the same name, the same network range, the same router address, and the same DNS server.

Moreover, if the container exposes services, you will have to setup network rules (or something similar) to reach those services. With Docker, there is a coherent syntax to express "yup, I want to expose port 8000 of that container" and then "hey, which public port was allocated for that container's port 8000?"

Docker also adapts the LXC configuration file depending on the local capabilities (for instance, an upcoming patch will enable apparmor containment iff it's available).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top