[lxc-users] Installing packages in a container while boot up or via script?

Bostjan Skufca bostjan at a2o.si
Sat Feb 28 23:19:06 UTC 2015


If I want to do something like that (i.e. when bootstrapping custom linux
system as LXC guest), I just chroot into newly-created container root and
do the "apt-get install ...".

This method uses host's network connection, but it requires container's
/etc/resolv.conf correctly configured. Also, if you are using subuid/gids,
pay attention when you do this procedure (generally before uidmapshift
step).

b.


On 28 February 2015 at 23:54, Anjali Kulkarni <anjali at juniper.net> wrote:

>  Hi,
>
>  Is there a way to install packages (like bridge utils etc) on some
> template like ubuntu while creating it via lxc-create? I read somewhere
> about --packages command but don’t seem to find it anywhere. I want to
> create a container and install packages on it via a script without manually
> having to login to the container.
>
>  Thanks
> Anjali
>
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150301/2412cdef/attachment.html>


More information about the lxc-users mailing list