dotcloud/docker — pull request #1302 by apatil (2013-07-26 00:15:45+00:00)
Title: Added -lxc-conf option

As requested in my previous pull request https://github.com/dotcloud/docker/pull/1275, I've added an lxc-conf argument that lets us add arbitrary lines to lxc's config file. I also added an lxc-dump argument that copies the config file to an easily accessible path.

If a user-provided lxc-conf argument conflicts with a Docker-provided one, the user's is used. A comment is added to the config file saying that has happened.

The lxc.mount.entry and lxc.cgroup.devices.allow entries can't be overridden; user-provided values for those are treated as additions.

I had to get rid of the template in lxc_template.go and replace it with the function in lxc_config.go. All the user override checks were making the template unreadable, defeating the purpose of a template.

I've carefully compared the generated config files against ones from the trunk, and have run a number of one-off tests, but haven't run the Vagrant testing setup because I am not au fait with Vagrant. I would appreciate it if someone with a testing setup could run the changes through it.