[lxc-users] What's the best way to copy file from host to container?

2015-05-08 Thread Dan Shi
I need to deploy some config files, e.g., .ssh config, key file etc, to container. I can copy the files to the absolute path in container, e.g., /usr/local/containers/base/rootfs/root/.ssh/ The problem is that, I have to change the owner and permission of the files manually. I'm wondering if there

Re: [lxc-users] What's the best way to copy file from host to container?

2015-04-30 Thread Fiedler Roman
> Von: lxc-users [mailto:lxc-users-boun...@lists.linuxcontainers.org] Im > Auftrag > > Greetings, LXC users mailing-list! > > >> > What about packing the files with e.g. cpio on the host and injecting > >> > them > via > >> > pipe to ns-attached cpio-process running in guest scope. > >> > >> > Th

Re: [lxc-users] What's the best way to copy file from host to container?

2015-04-28 Thread Andrey Repin
Greetings, LXC users mailing-list! >> > What about packing the files with e.g. cpio on the host and injecting them >> > via >> > pipe to ns-attached cpio-process running in guest scope. >> >> > This also works around guest to host privilege escalation if malicious >> > guest >> > content moves a

Re: [lxc-users] What's the best way to copy file from host to container?

2015-04-28 Thread Fiedler Roman
Hello Andrey, > Von: lxc-users [mailto:lxc-users-boun...@lists.linuxcontainers.org] Im > Auftrag > > Greetings, Fiedler Roman. > > Monday, April 27, 2015, 09:14:26 you wrote: > > >> This seems to be the perfect solution, I can just copy over to the path > >> like > >> proc/12423/root/usr/local,

Re: [lxc-users] What's the best way to copy file from host to container?

2015-04-27 Thread Andrey
Greetings, Fiedler Roman. Monday, April 27, 2015, 09:14:26 you wrote: I need to deploy some config files, e.g., .ssh config, key file etc, to container. I can copy the files to the absolute path in container, e.g., /usr/local/containers/base/rootfs/root/.ssh/ The prob

Re: [lxc-users] What's the best way to copy file from host to container?

2015-04-26 Thread Fiedler Roman
> Von: lxc-users [mailto:lxc-users-boun...@lists.linuxcontainers.org] Im > Auftrag > > Hi Andrey, > > This seems to be the perfect solution, I can just copy over to the path like > proc/12423/root/usr/local, without worrying about snapshot clone uses > delta0, rather than root in the container fol

Re: [lxc-users] What's the best way to copy file from host to container?

2015-04-26 Thread Dan Shi
Hi Andrey, This seems to be the perfect solution, I can just copy over to the path like proc/12423/root/usr/local, without worrying about snapshot clone uses delta0, rather than root in the container folder. After I moved the file, I still need to update the file permissions and ownership though.

Re: [lxc-users] What's the best way to copy file from host to container?

2015-04-24 Thread Drake Wilson
Drake Wilson wrote: > #!/bin/sh > n=$1; shift > exec lxc-attach -n "$1" ${1+-- "$@"} Blech, I meant exec lxc-attach -n "$n" ${1+-- "$@"} of course. Woops. ---> Drake Wilson ___ lxc-users mailing list lxc-users@lists.linuxconta

Re: [lxc-users] What's the best way to copy file from host to container?

2015-04-24 Thread Drake Wilson
Dan Shi wrote: > OK, I got scp working, it's actually quite straight forward. > Just wondering if there is other option that doesn't need container's IP? > i.e., only need container's name. That way the container doesn't need network > access. So, you can't do that _too_ straightforwardly with SS

Re: [lxc-users] What's the best way to copy file from host to container?

2015-04-24 Thread Andrey
Greetings, Dan Shi. Saturday, April 25, 2015, 00:37:27 you wrote: DS> I need to deploy some config files, e.g., .ssh config, key file etc, to DS> container. I can copy the files to the absolute path in container, e.g., DS> /usr/local/containers/base/rootfs/root/.ssh/ DS> The problem is that,

Re: [lxc-users] What's the best way to copy file from host to container?

2015-04-24 Thread Dan Shi
OK, I got scp working, it's actually quite straight forward. Just wondering if there is other option that doesn't need container's IP? i.e., only need container's name. That way the container doesn't need network access. Thanks, Dan On Fri, Apr 24, 2015 at 2:37 PM, Dan Shi wrote: > I need to de

[lxc-users] What's the best way to copy file from host to container?

2015-04-24 Thread Dan Shi
I need to deploy some config files, e.g., .ssh config, key file etc, to container. I can copy the files to the absolute path in container, e.g., /usr/local/containers/base/rootfs/root/.ssh/ The problem is that, I have to change the owner and permission of the files manually. I'm wondering if there