diff options
author | LStandman <65296484+LStandman@users.noreply.github.com> | 2022-02-12 13:45:49 +0200 |
---|---|---|
committer | LStandman <65296484+LStandman@users.noreply.github.com> | 2022-03-14 10:31:58 +0200 |
commit | e8968c867f7af21f9e5eec661f7e057a74127511 (patch) | |
tree | 0a25a2cf34698a2e3e7651a1bcda6cbcb0b08b44 /libpod/options.go | |
parent | 0144cabc41b82e4c1b59f681ca845c01ae1735de (diff) | |
download | podman-e8968c867f7af21f9e5eec661f7e057a74127511.tar.gz podman-e8968c867f7af21f9e5eec661f7e057a74127511.tar.bz2 podman-e8968c867f7af21f9e5eec661f7e057a74127511.zip |
Add support for --chrootdirs
Signed-off-by: LStandman <65296484+LStandman@users.noreply.github.com>
Diffstat (limited to 'libpod/options.go')
-rw-r--r-- | libpod/options.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/libpod/options.go b/libpod/options.go index 1ee4e7322..2e5454393 100644 --- a/libpod/options.go +++ b/libpod/options.go @@ -2036,3 +2036,18 @@ func WithVolatile() CtrCreateOption { return nil } } + +// WithChrootDirs is an additional set of directories that need to be +// treated as root directories. Standard bind mounts will be mounted +// into paths relative to these directories. +func WithChrootDirs(dirs []string) CtrCreateOption { + return func(ctr *Container) error { + if ctr.valid { + return define.ErrCtrFinalized + } + + ctr.config.ChrootDirs = dirs + + return nil + } +} |