diff options
Diffstat (limited to 'cmd/podman')
-rw-r--r-- | cmd/podman/common/specgen.go | 5 | ||||
-rw-r--r-- | cmd/podman/common/volumes.go | 2 | ||||
-rw-r--r-- | cmd/podman/images/build.go | 10 |
3 files changed, 5 insertions, 12 deletions
diff --git a/cmd/podman/common/specgen.go b/cmd/podman/common/specgen.go index bd3e5fafd..ca1e25be1 100644 --- a/cmd/podman/common/specgen.go +++ b/cmd/podman/common/specgen.go @@ -25,11 +25,8 @@ func getCPULimits(c *ContainerCLIOpts) *specs.LinuxCPU { cpu := &specs.LinuxCPU{} hasLimits := false - const cpuPeriod = 100000 - if c.CPUS > 0 { - quota := int64(c.CPUS * cpuPeriod) - period := uint64(cpuPeriod) + period, quota := util.CoresToPeriodAndQuota(c.CPUS) cpu.Period = &period cpu.Quota = "a diff --git a/cmd/podman/common/volumes.go b/cmd/podman/common/volumes.go index 8ab20ccae..b3c160ddf 100644 --- a/cmd/podman/common/volumes.go +++ b/cmd/podman/common/volumes.go @@ -313,7 +313,7 @@ func getBindMount(args []string) (spec.Mount, error) { } setExec = true newMount.Options = append(newMount.Options, kv[0]) - case "shared", "rshared", "private", "rprivate", "slave", "rslave", "Z", "z": + case "shared", "rshared", "private", "rprivate", "slave", "rslave", "unbindable", "runbindable", "Z", "z": newMount.Options = append(newMount.Options, kv[0]) case "bind-propagation": if len(kv) == 1 { diff --git a/cmd/podman/images/build.go b/cmd/podman/images/build.go index 0ff482cd9..f48d1cd94 100644 --- a/cmd/podman/images/build.go +++ b/cmd/podman/images/build.go @@ -240,13 +240,9 @@ func buildFlagsWrapperToOptions(c *cobra.Command, contextDir string, flags *buil } } - pullPolicy := imagebuildah.PullIfNewer - if c.Flags().Changed("pull") { - if flags.Pull { - pullPolicy = imagebuildah.PullAlways - } else { - pullPolicy = imagebuildah.PullNever - } + pullPolicy := imagebuildah.PullIfMissing + if c.Flags().Changed("pull") && flags.Pull { + pullPolicy = imagebuildah.PullAlways } if flags.PullAlways { pullPolicy = imagebuildah.PullAlways |