mirror of
https://github.com/containers/podman.git
synced 2025-12-11 01:11:30 +08:00
Remove --storage-opt from podman run/create
podman command has storage options as a global option, these should be set there, rather then in the create and run commands. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #234 Approved by: baude
This commit is contained in:
committed by
Atomic Bot
parent
f77bd95426
commit
d4e4878ec3
@@ -114,7 +114,6 @@ type createConfig struct {
|
||||
SigProxy bool //sig-proxy
|
||||
StopSignal syscall.Signal // stop-signal
|
||||
StopTimeout uint // stop-timeout
|
||||
StorageOpts []string //storage-opt
|
||||
Sysctl map[string]string //sysctl
|
||||
Tmpfs []string // tmpfs
|
||||
Tty bool //tty
|
||||
@@ -626,7 +625,6 @@ func parseCreateOpts(c *cli.Context, runtime *libpod.Runtime, imageName string,
|
||||
SigProxy: c.Bool("sig-proxy"),
|
||||
StopSignal: stopSignal,
|
||||
StopTimeout: c.Uint("stop-timeout"),
|
||||
StorageOpts: c.StringSlice("storage-opt"),
|
||||
Sysctl: sysctl,
|
||||
Tmpfs: c.StringSlice("tmpfs"),
|
||||
Tty: tty,
|
||||
|
||||
@@ -696,21 +696,6 @@ func parseSecurityOpts(securityOpts []string) ([]string, error) { //nolint
|
||||
return securityOpts, nil
|
||||
}
|
||||
|
||||
// parses storage options per container into a map
|
||||
// for storage-opt flag
|
||||
func parseStorageOpts(storageOpts []string) (map[string]string, error) { //nolint
|
||||
m := make(map[string]string)
|
||||
for _, option := range storageOpts {
|
||||
if strings.Contains(option, "=") {
|
||||
opt := strings.SplitN(option, "=", 2)
|
||||
m[opt[0]] = opt[1]
|
||||
} else {
|
||||
return nil, errors.Errorf("invalid storage option %q", option)
|
||||
}
|
||||
}
|
||||
return m, nil
|
||||
}
|
||||
|
||||
// convertKVStringsToMap converts ["key=value"] to {"key":"value"}
|
||||
func convertKVStringsToMap(values []string) map[string]string {
|
||||
result := make(map[string]string, len(values))
|
||||
|
||||
@@ -1079,7 +1079,6 @@ _podman_container_run() {
|
||||
--shm-size
|
||||
--stop-signal
|
||||
--stop-timeout
|
||||
--storage-opt
|
||||
--tmpfs
|
||||
--sysctl
|
||||
--ulimit
|
||||
|
||||
@@ -422,17 +422,6 @@ incompatible with any restart policy other than `none`.
|
||||
**--stop-timeout**=*10*
|
||||
Timeout (in seconds) to stop a container. Default is 10.
|
||||
|
||||
**--storage-opt**=[]
|
||||
Storage driver options per container
|
||||
|
||||
$ podman create -it --storage-opt size=120G fedora /bin/bash
|
||||
|
||||
This (size) will allow to set the container rootfs size to 120G at creation time.
|
||||
This option is only available for the `devicemapper`, `btrfs`, `overlay2` and `zfs` graph drivers.
|
||||
For the `devicemapper`, `btrfs` and `zfs` storage drivers, user cannot pass a size less than the Default BaseFS Size.
|
||||
For the `overlay2` storage driver, the size option is only available if the backing fs is `xfs` and mounted with the `pquota` mount option.
|
||||
Under these conditions, user can pass any size less then the backing fs size.
|
||||
|
||||
**--sysctl**=SYSCTL
|
||||
Configure namespaced kernel parameters at runtime
|
||||
|
||||
|
||||
@@ -420,17 +420,6 @@ incompatible with any restart policy other than `none`.
|
||||
**--stop-timeout**=*10*
|
||||
Timeout (in seconds) to stop a container. Default is 10.
|
||||
|
||||
**--storage-opt**=[]
|
||||
Storage driver options per container
|
||||
|
||||
$ podman run -it --storage-opt size=120G fedora /bin/bash
|
||||
|
||||
This (size) will allow to set the container rootfs size to 120G at creation time.
|
||||
This option is only available for the `devicemapper`, `btrfs`, `overlay2` and `zfs` graph drivers.
|
||||
For the `devicemapper`, `btrfs` and `zfs` storage drivers, user cannot pass a size less than the Default BaseFS Size.
|
||||
For the `overlay2` storage driver, the size option is only available if the backing fs is `xfs` and mounted with the `pquota` mount option.
|
||||
Under these conditions, user can pass any size less then the backing fs size.
|
||||
|
||||
**--sysctl**=SYSCTL
|
||||
Configure namespaced kernel parameters at runtime
|
||||
|
||||
|
||||
Reference in New Issue
Block a user