From e64e6500d3a3bdbb2d3c9faa5e2d9d845f120b17 Mon Sep 17 00:00:00 2001 From: Aditya Rajan Date: Tue, 28 Dec 2021 16:02:25 +0530 Subject: volume: add support for non-volatile upperdir,workdir for overlay volumes Often users want their overlayed volumes to be `non-volatile` in nature that means that same `upper` dir can be re-used by one or more containers but overall of nature of volumes still have to be `overlay` so work done is still on a overlay not on the actual volume. Following PR adds support for more advanced options i.e custom `workdir` and `upperdir` for overlayed volumes. So that users can re-use `workdir` and `upperdir` across new containers as well. Usage ```console $ podman run -it -v myvol:/data:O,upperdir=/path/persistant/upper,workdir=/path/persistant/work alpine sh ``` Signed-off-by: Aditya R --- docs/source/markdown/podman-run.1.md | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'docs') diff --git a/docs/source/markdown/podman-run.1.md b/docs/source/markdown/podman-run.1.md index 241cb6d95..59f36f67d 100644 --- a/docs/source/markdown/podman-run.1.md +++ b/docs/source/markdown/podman-run.1.md @@ -1394,6 +1394,10 @@ directory will be the lower, and the container storage directory will be the upper. Modifications to the mount point are destroyed when the container finishes executing, similar to a tmpfs mount point being unmounted. + For advanced users overlay option also supports custom non-volatile `upperdir` and `workdir` +for the overlay mount. Custom `upperdir` and `workdir` can be fully managed by the users themselves +and `podman` will not remove it on lifecycle completion. Example `:O,upperdir=/some/upper,workdir=/some/work` + Subsequent executions of the container will see the original source directory content, any changes from previous container executions no longer exist. -- cgit v1.2.3-54-g00ecf