blog/content/post/mount-shared-directories-in-incus.md
2024-04-27 23:41:47 +05:30

1.6 KiB

title date lastmod draft keywords description tags categories author comment toc autoCollapseToc postMetaInFooter hiddenFromHomePage contentCopyright reward mathjax mathjaxEnableSingleDollar mathjaxEnableAutoNumber hideHeaderAndFooter flowchartDiagrams sequenceDiagrams
Mount Shared Directories in Incus 2024-04-27T23:30:08+05:30 2024-04-27T23:30:08+05:30 false
incus
incus
linux
false false false true false false false false false false false
enable options
false
enable options
false

There will arise situations when you will want to share files between host and container. The solution is just a one liner.

It follows the following syntax:

incus config device add <container> <device name> disk source=</path/to/directory/> path=</mount/point/in/conainer>

Example:

incus config device add conatiner1 movies disk source=/srv/movies path=/mnt/movies

Or if you are feeling special, you can directly edit the config with incus config edit <container>, following the previous example:

dveices:
  movies:
    path: /mnt/movies
    source: /srv/movies
    type: disk