diff options
author | Ashley Cui <acui@redhat.com> | 2020-07-16 21:49:47 -0400 |
---|---|---|
committer | Ashley Cui <acui@redhat.com> | 2020-07-21 14:22:30 -0400 |
commit | d4d3fbc155419f4017064a65e718ad78d50115cc (patch) | |
tree | 4f73ccfa606a6f8a0d4de07749ce2323687b870d /libpod/container.go | |
parent | df6920aa79073b2767d24c6524367384b6284b31 (diff) | |
download | podman-d4d3fbc155419f4017064a65e718ad78d50115cc.tar.gz podman-d4d3fbc155419f4017064a65e718ad78d50115cc.tar.bz2 podman-d4d3fbc155419f4017064a65e718ad78d50115cc.zip |
Add --umask flag for create, run
--umask sets the umask inside the container
Defaults to 0022
Co-authored-by: Daniel J Walsh <dwalsh@redhat.com>
Signed-off-by: Ashley Cui <acui@redhat.com>
Diffstat (limited to 'libpod/container.go')
-rw-r--r-- | libpod/container.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libpod/container.go b/libpod/container.go index fda018640..8a69df685 100644 --- a/libpod/container.go +++ b/libpod/container.go @@ -437,6 +437,9 @@ type ContainerConfig struct { // Timezone is the timezone inside the container. // Local means it has the same timezone as the host machine Timezone string `json:"timezone,omitempty"` + + // Umask is the umask inside the container. + Umask string `json:"umask,omitempty"` } // ContainerNamedVolume is a named volume that will be mounted into the @@ -1276,5 +1279,8 @@ func (c *Container) AutoRemove() bool { func (c *Container) Timezone() string { return c.config.Timezone +} +func (c *Container) Umask() string { + return c.config.Umask } |