summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/common/volumes.go29
-rw-r--r--cmd/podman/containers/exec.go4
-rw-r--r--cmd/podman/images/list.go6
-rw-r--r--cmd/podman/pods/ps.go5
-rw-r--r--cmd/podman/system/migrate.go2
-rw-r--r--cmd/podman/system/renumber.go2
-rw-r--r--cmd/podman/system/reset.go2
-rw-r--r--cmd/podman/system/service.go2
-rw-r--r--cmd/podman/system/service_abi.go2
-rw-r--r--cmd/podman/system/service_unsupported.go2
-rw-r--r--cmd/podman/system/varlink.go2
11 files changed, 25 insertions, 33 deletions
diff --git a/cmd/podman/common/volumes.go b/cmd/podman/common/volumes.go
index a70410ad3..63bb8e5f0 100644
--- a/cmd/podman/common/volumes.go
+++ b/cmd/podman/common/volumes.go
@@ -209,36 +209,21 @@ func getBindMount(args []string) (spec.Mount, error) {
switch kv[0] {
case "bind-nonrecursive":
newMount.Options = append(newMount.Options, "bind")
- case "readonly", "read-only":
- if setRORW {
- return newMount, errors.Wrapf(optionArgError, "cannot pass 'readonly', 'ro', or 'rw' options more than once")
- }
- setRORW = true
- switch len(kv) {
- case 1:
- newMount.Options = append(newMount.Options, "ro")
- case 2:
- switch strings.ToLower(kv[1]) {
- case "true":
- newMount.Options = append(newMount.Options, "ro")
- case "false":
- // RW is default, so do nothing
- default:
- return newMount, errors.Wrapf(optionArgError, "readonly must be set to true or false, instead received %q", kv[1])
- }
- default:
- return newMount, errors.Wrapf(optionArgError, "badly formatted option %q", val)
- }
- case "ro", "rw":
+ case "readonly", "ro", "rw":
if setRORW {
return newMount, errors.Wrapf(optionArgError, "cannot pass 'readonly', 'ro', or 'rw' options more than once")
}
setRORW = true
// Can be formatted as one of:
+ // readonly
+ // readonly=[true|false]
// ro
// ro=[true|false]
// rw
// rw=[true|false]
+ if kv[0] == "readonly" {
+ kv[0] = "ro"
+ }
switch len(kv) {
case 1:
newMount.Options = append(newMount.Options, kv[0])
@@ -253,7 +238,7 @@ func getBindMount(args []string) (spec.Mount, error) {
newMount.Options = append(newMount.Options, "ro")
}
default:
- return newMount, errors.Wrapf(optionArgError, "%s must be set to true or false, instead received %q", kv[0], kv[1])
+ return newMount, errors.Wrapf(optionArgError, "'readonly', 'ro', or 'rw' must be set to true or false, instead received %q", kv[1])
}
default:
return newMount, errors.Wrapf(optionArgError, "badly formatted option %q", val)
diff --git a/cmd/podman/containers/exec.go b/cmd/podman/containers/exec.go
index 7554d6a93..41f100768 100644
--- a/cmd/podman/containers/exec.go
+++ b/cmd/podman/containers/exec.go
@@ -67,14 +67,14 @@ func execFlags(flags *pflag.FlagSet) {
func init() {
registry.Commands = append(registry.Commands, registry.CliCommand{
- Mode: []entities.EngineMode{entities.ABIMode},
+ Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode},
Command: execCommand,
})
flags := execCommand.Flags()
execFlags(flags)
registry.Commands = append(registry.Commands, registry.CliCommand{
- Mode: []entities.EngineMode{entities.ABIMode},
+ Mode: []entities.EngineMode{entities.ABIMode, entities.TunnelMode},
Command: containerExecCommand,
Parent: containerCmd,
})
diff --git a/cmd/podman/images/list.go b/cmd/podman/images/list.go
index 4f8948b8b..23757104b 100644
--- a/cmd/podman/images/list.go
+++ b/cmd/podman/images/list.go
@@ -234,11 +234,7 @@ func imageListFormat(flags listFlagType) (string, string) {
}
hdr += "\tIMAGE ID"
- if flags.noTrunc {
- row += "\tsha256:{{.ID}}"
- } else {
- row += "\t{{.ID}}"
- }
+ row += "\t{{.ID}}"
hdr += "\tCREATED\tSIZE"
row += "\t{{.Created}}\t{{.Size}}"
diff --git a/cmd/podman/pods/ps.go b/cmd/podman/pods/ps.go
index 5703bd172..1385ff270 100644
--- a/cmd/podman/pods/ps.go
+++ b/cmd/podman/pods/ps.go
@@ -178,6 +178,11 @@ func (l ListPodReporter) Created() string {
return units.HumanDuration(time.Since(l.ListPodsReport.Created)) + " ago"
}
+// Labels returns a map of the pod's labels
+func (l ListPodReporter) Labels() map[string]string {
+ return l.ListPodsReport.Labels
+}
+
// NumberofContainers returns an int representation for
// the number of containers belonging to the pod
func (l ListPodReporter) NumberOfContainers() int {
diff --git a/cmd/podman/system/migrate.go b/cmd/podman/system/migrate.go
index 13aa162c7..28c23d88f 100644
--- a/cmd/podman/system/migrate.go
+++ b/cmd/podman/system/migrate.go
@@ -1,3 +1,5 @@
+// +build !remote
+
package system
import (
diff --git a/cmd/podman/system/renumber.go b/cmd/podman/system/renumber.go
index 5ee6b3be6..b90640de3 100644
--- a/cmd/podman/system/renumber.go
+++ b/cmd/podman/system/renumber.go
@@ -1,3 +1,5 @@
+// +build !remote
+
package system
import (
diff --git a/cmd/podman/system/reset.go b/cmd/podman/system/reset.go
index 6caa91690..b16fbd9c7 100644
--- a/cmd/podman/system/reset.go
+++ b/cmd/podman/system/reset.go
@@ -1,3 +1,5 @@
+// +build !remote
+
package system
import (
diff --git a/cmd/podman/system/service.go b/cmd/podman/system/service.go
index 0f42ae28b..1b07ee301 100644
--- a/cmd/podman/system/service.go
+++ b/cmd/podman/system/service.go
@@ -1,4 +1,4 @@
-// +build linux
+// +build linux,!remote
package system
diff --git a/cmd/podman/system/service_abi.go b/cmd/podman/system/service_abi.go
index 3da6ccfc7..501650839 100644
--- a/cmd/podman/system/service_abi.go
+++ b/cmd/podman/system/service_abi.go
@@ -1,4 +1,4 @@
-// +build ABISupport
+// +build ABISupport,!remote
package system
diff --git a/cmd/podman/system/service_unsupported.go b/cmd/podman/system/service_unsupported.go
index 95f8189f6..82272c882 100644
--- a/cmd/podman/system/service_unsupported.go
+++ b/cmd/podman/system/service_unsupported.go
@@ -1,4 +1,4 @@
-// +build !ABISupport
+// +build !ABISupport,!remote
package system
diff --git a/cmd/podman/system/varlink.go b/cmd/podman/system/varlink.go
index 6a38b3d28..19535e539 100644
--- a/cmd/podman/system/varlink.go
+++ b/cmd/podman/system/varlink.go
@@ -1,4 +1,4 @@
-// +build linux
+// +build linux,!remote
package system