[lxc-users] fetching application update out of container's space

Tycho Andersen tycho.andersen at canonical.com
Wed Jun 10 21:06:52 UTC 2015


On Wed, Jun 10, 2015 at 09:22:10PM +0200, Genco Yilmaz wrote:
> Hi,
>    I have been playing with containers for a few days only and deployed
> several to test some networking features. I have searched on the net to get
> an answer but couldn't find any post/page yet. Issue is that I set up a
> small LAB
> containers of which has no internet access. If I need to install an
> application e.g apache2
> I attach to the container like;
> 
> #lxc-attach -n container1
> container1#apt-get install apache2
> 
> but for this to work, I add a veth peer to let the container access outside
> network (This isn't something I prefer to do as I need to isolate these
> containers)

Why not just run an apt mirror on the isolated network?

> I wonder if there is any way to install this app from the master host i.e
> by using master
> host's network space but install the app on the container something like
> this imaginary command;
> 
> #*lxc-run* -n container -c "apt-get install apache2"
> 
> i.e pulling the application from repository on the master space but pushing
> it onto the container.
> 
> There is lxc-execute, lxc-attach but they all run inside container's space
> which doesn't work for me.

You might like the -s option to lxc-attach.

Tycho

> Thanks,
> 
> Genco.

> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users



More information about the lxc-users mailing list