通常要在 lxc 與 host 之間複製檔案都會用 scp,但是要打一長串的指令,lxc 提供了 pull 與 push 的功能讓你方便讓兩邊檔案複製。
從 lxc 把檔案複製出來
lxc file pull $target-container/$target-path/$target-file .
把檔案複製到 lxc 裡面
lxc file push $target-file $target-container/$target-path/
資料夾 -r
lxc file push -r $target-dir $target-container/$target-path/
pull 也以此類推,加上 -r。