[lxc-users] LXC package on default templates

Michael H. Warfield mhw at WittsEnd.com
Tue May 6 20:48:57 UTC 2014


On Tue, 2014-05-06 at 20:28 +0000, Marcello Lorenzi wrote:
> Hi All,
> I'm trying to install a test environment on my local server and I used
> the default template lxc-fedora provided by the lxc-templates package.
> I need to add some packages to the default installation but i can't
> find the correct way to install these packages from the lxc-create
> command.
> 
> Can someone help me to undestand the correct way to add these
> packages?

A few templates have the ability to add packages (and even alternate
repos) at the time the container is created but the Fedora and CentOS
templates are currently not ones of those.  I've considered adding that
feature but there remains issues of caching and accumulation that I
haven't quite figured out yet to my satisfaction.

To add additional packages to a container after creation and prior to
actually starting the container, I use the following command (I do this
with sudo for everyone container):

chroot /var/lib/lxc/${CONTAINER}/rootfs yum install ${PACKAGE_LIST}

> Thanks,
> Marcello

Regards,
Mike
-- 
Michael H. Warfield (AI4NB) | (770) 978-7061 |  mhw at WittsEnd.com
   /\/\|=mhw=|\/\/          | (678) 463-0932 |  http://www.wittsend.com/mhw/
   NIC whois: MHW9          | An optimist believes we live in the best of all
 PGP Key: 0x674627FF        | possible worlds.  A pessimist is sure of it!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 482 bytes
Desc: This is a digitally signed message part
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20140506/a3954190/attachment.sig>


More information about the lxc-users mailing list