User Tools

Site Tools


docker:docker_vs_lxc

Docker - Docker vs LXC

Early versions of docker used LXC as the container execution driver but then this was later made optional and eventually dropped.

Docker is nowadays not related to LXC.

LXC containers are not just an application instance. LXC containers provide an isolated OS instance on which you can install one or more applications unlike a Docker instance which is for a single packaged installation.

Docker aims at running a single application in an isolated, self-contained environment. These are generally referred to as Application Containers, rather than System Containers.

Docker does not include a separate operating system and piggy backs off the system it runs on. Docker therefore needs to also run preloaded emulation software so there is overhead. In LXC there is no preloaded emulation manager software so it runs with no added overhead; and this is why LXC is faster than docker.

LXC is default for Proxmox too, due to it better supporting virtualization.

A limitation to Docker containers is that once you create one, it really can't be modified easily. So, in the case of “Pi-Hole” as an example, you would have to create a new container when a new version of Pi-Hole is released. That's because the Docker Image is an image. Yes, this can be done and you can copy over the config as well and reload it etc, but with LXCc say running an Ubuntu OS, it's simply an apt update && apt upgrade.

Docker does have it's place. Keep docker for running individual apps, such as nginx, but Pi-Hole is not an individual app - it is composed of a number of services such as a dns resolver, a web interface, a db etc.

docker/docker_vs_lxc.txt · Last modified: 2020/12/15 11:51 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki