Enjoy Slackware 15.0!

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
howtos:misc:lxc [2018/09/15 20:54 (UTC)]
montagdude [Network] Clarify that lxcpath is a variable
howtos:misc:lxc [2018/09/15 20:57 (UTC)]
montagdude [Sharing Directories with the Host] Clarify that lxcpath is a variable
Line 145: Line 145:
 ==== Sharing Directories with the Host ==== ==== Sharing Directories with the Host ====
  
-Because an LXC container's filesystem is just a directory on the host, if you only need to transfer files from the host to the container, you can simply copy them over. However, often you will want to share the files both ways, or rather, be able to access //the same files// within the container without having to actually transfer anything, and this is a little more difficult because the container is isolated. LXC provides utilities to mount host directories on containers for this purpose. We will assume that the directory to be shared is at /home/username/foo on the host. To share a user directory with the host, first log into the container and create the top-level of the directory to be shared. Then log out and stop the container. Add the following lines to the container's config file (lxcpath/container_name/config):+Because an LXC container's filesystem is just a directory on the host, if you only need to transfer files from the host to the container, you can simply copy them over. However, often you will want to share the files both ways, or rather, be able to access //the same files// within the container without having to actually transfer anything, and this is a little more difficult due to the isolation of the container. LXC provides utilities to mount host directories on containers for this purpose. We will assume that the directory to be shared is at /home/username/foo on the host. To share a user directory with the host, first log into the container and create the top-level of the directory to be shared. Then log out and stop the container. Add the following lines to the container's config file ($lxcpath/container_name/config):
  
 <code> <code>

In Other Languages
QR Code
QR Code howtos:misc:lxc (generated for current page)