dotcloud/docker — pull request #5797 by alexlarsson (2014-05-14 13:57:32+00:00)
Title: Remove lxc exec driver

This removes the lxc exec driver and the -lxc-conf option, as well as some now unused things.

This pull request is mostly of a suggestion and request for comments, but i think it makes a lot of sense.

So, Why remove the lxc driver?

At the core, the lxc driver and the native driver do the same thing. They rely on the same kernel features, and set them up in more or less the same way. The only difference is that in the lxc backend this happens by setting up an lxc template file that describes what we want and then asking lxc to do that. The problem with this that whenever we need to do something during container setup that the lxc templates don't support we run into problems (we'll never have the opposite problem, anything lxc adds we can also do in the native driver). Also, we have to maintain two completely different codebases that do the same thing.

Since its hard to keep up maintainership of the lxc backend its already starting to diverge slightly in behaviour. For instance, it does not use the new /dev tmpfs that the native driver does (it can't because it requires custom setup that the templates don't support). It also doesn't create bind-mount target that don't exist, which means that volumes don't work in places like /run or /dev (if the previous bug was fixed).

There is also ongoing work to have a separate supervisor process for each container, and the work that will be involved in this will require various changes in how containers are setup that will be very hard to implement using lxc.

Furthermore, if we remove lxc we remove the requirement that docker has to be statically linked, which makes building docker a lot easier.