[Lxc-users] Creating multiple containers simultaneously

Derek Simkowiak derek at simkowiak.net
Mon Nov 28 21:23:45 UTC 2011


What I would love to do is to setup a "base" container which contains the OS and the required
packages (the common part) and to create several - customizable - instances of this container.


     Roberto,
     My LXC creation script "lxc-ubuntu-x" has this feature.  You can 
create any number of "templates", where each template features both a 
unique tarball (with all packages, etc. already installed) and also a 
customized set of configuration commands (so you can run your own setup 
programs and/or shell commands).

     It caches everything in a tarball so that deployment of a brand new 
container takes about ~4 seconds.  (This is because untarring a tarball 
is much faster than copying individual files, or running debootstrap).  
It has also allows you to create complete deployments without human 
interaction, and it takes care of generating unique MAC addresses, SSH 
server certs, SSL certs (for LAMP), and a default new user with a 
pre-installed .ssh/authorized_keys file.

     The code is on github.  Homepage is at:

http://derek.simkowiak.net/lxc-ubuntu-x/


Thanks,
Derek Simkowiak

On 11/28/2011 09:40 AM, Roberto Aloi wrote:
> containers after each job submission. What I would love to do is to
> setup a "base" container which contains the OS and the required
> packages (the common part) and to create several - customizable -
> instances of this container. When I say "customizable" I mean that I
> should be able to specify a port number which a server running inside
> one of the containers should listen to and this number should be
> different per each container. Would this be feasible via LXC? Any
> suggestion on how to achieve this?




More information about the lxc-users mailing list