Jake Asked: 2018-06-21 06:00:01 +0800 CST2018-06-21 06:00:01 +0800 CST 2018-06-21 06:00:01 +0800 CST How do I copy a file/directory from host into a LXD container? 772 I have a file/directory on the host that I want to copy into the LXD container. What is the command to copy the host -> container? container lxd 1 Answers Voted Vahid Amintabar 2018-07-04T02:42:00+08:002018-07-04T02:42:00+08:00 Suppose we want to copy file.txt from host to /home/ubuntu/ directory of the container1 lxc file push file.txt container1/home/ubuntu/ to copy a directory from host to container, use -r lxc file push -r direcoty/ vm1/home/ubuntu/ to copy file from container to host, use pull lxc file pull vm1/home/ubuntu/file.txt .
Suppose we want to copy
file.txt
from host to/home/ubuntu/
directory of thecontainer1
lxc file push file.txt container1/home/ubuntu/
to copy a directory from host to container, use
-r
lxc file push -r direcoty/ vm1/home/ubuntu/
to copy file from container to host, use
pull
lxc file pull vm1/home/ubuntu/file.txt .