Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 17 Next »

Quick notes in Docker in relation to LXC.

Docker is a front-end application virtualization engine based on OS level virtualization. Docker started with LXC (Linux Containers) under the hoods but since version 0.9 switched to it's own libcontainer as the default virtual engine.

The two technologies appear to have similar functions. Initially I had a hard time wrapping my head around why to use Docker over LXC which to me is much more flexible and I don't lose ssh access. However, interestingly enough as I used LXC more, I started to appreciate the spirit of Docker's approach to being so restrictive. From the view of writing applications and operating them:

  • Ephemeral - Being stateless you build must externalize the right things (logs, application property files) from day 1.
  • Single Process as Best Practice - I lose SSH access, but I then stop thinking of stacks (OS, Java, JEE Server, Application Code) and instead of a single package.
  • No Upgrading, Just Rebuilt - Day 1 you script your application and OS. Why upgrade, update your script and automate from day 1.

It's a fundamental mind shift. If forces both Ops and Developers into a repeatable automated approach to building servers and coding applications. This shifts work instead to using good orchestration software (which I am in process of researching). The Docker base OS template is pared down to a single app environment and does not endorse an init, services, daemons, syslog, cron or running multiple applications.

You can run Dockers inside of Linux containers with virtually no performance impact.

Which one to learn first? If you want to really understand things, learn LXC and you'll know Docker. It's like starting with DOS then learning Windows.

Is one better than the other. No, they have different uses (which I'll outline later here).

References

See my hosting page for Virtualization technologies.

LXC vs Docker - http://www.flockport.com/lxc-vs-docker/

Discusses security - https://blog.docker.com/2013/08/containers-docker-how-secure-are-they/


  • No labels