how to mount a folder from lxc

前端 未结 2 956
难免孤独
难免孤独 2021-01-13 15:53

I have the lxc, it has a running application. To edit the code of this application on own computer(Ubuntu 13.10), I want to mount a directory lxc. How can this be done?

2条回答
  •  有刺的猬
    2021-01-13 16:22

    If you want to mount automatically a directory inside the lxc each time you start the lxc you can use the lxc.mount.entry directory inside /var/lib/lxc/ubuntu_12_04/config file. With Something like:

    lxc.mount.entry = /mnt/lxc home/ none bind 0 0
    

    This will mount /mnt/lxc inside the lxc root filesystem aka rootfs at home/ directory.

提交回复
热议问题