summaryrefslogtreecommitdiff
path: root/cmd
diff options
context:
space:
mode:
Diffstat (limited to 'cmd')
-rw-r--r--cmd/podman/attach.go4
-rw-r--r--cmd/podman/checkpoint.go4
-rw-r--r--cmd/podman/diff.go4
-rw-r--r--cmd/podman/exec.go4
-rw-r--r--cmd/podman/export.go3
-rw-r--r--cmd/podman/import.go4
-rw-r--r--cmd/podman/kill.go4
-rw-r--r--cmd/podman/login.go2
-rw-r--r--cmd/podman/logout.go4
-rw-r--r--cmd/podman/pause.go4
-rw-r--r--cmd/podman/pod_start.go4
-rw-r--r--cmd/podman/pod_stats.go4
-rw-r--r--cmd/podman/pod_top.go4
-rw-r--r--cmd/podman/ps.go4
-rw-r--r--cmd/podman/sign.go3
-rw-r--r--cmd/podman/trust_set_show.go2
-rw-r--r--cmd/podman/umount.go4
-rw-r--r--cmd/podman/unpause.go3
-rw-r--r--cmd/podman/volume_create.go4
-rw-r--r--cmd/podman/volume_inspect.go4
20 files changed, 53 insertions, 20 deletions
diff --git a/cmd/podman/attach.go b/cmd/podman/attach.go
index f6492240d..b70ff649c 100644
--- a/cmd/podman/attach.go
+++ b/cmd/podman/attach.go
@@ -22,7 +22,9 @@ var (
attachCommand.GlobalFlags = MainGlobalOpts
return attachCmd(&attachCommand)
},
- Example: "",
+ Example: `podman attach ctrID
+ podman attach 1234
+ podman attach --no-stdin foobar`,
}
)
diff --git a/cmd/podman/checkpoint.go b/cmd/podman/checkpoint.go
index aa4034ccd..3484e8957 100644
--- a/cmd/podman/checkpoint.go
+++ b/cmd/podman/checkpoint.go
@@ -29,7 +29,9 @@ var (
checkpointCommand.GlobalFlags = MainGlobalOpts
return checkpointCmd(&checkpointCommand)
},
- Example: "CONTAINER-NAME [CONTAINER-NAME ...]",
+ Example: `podman checkpoint --keep ctrID
+ podman checkpoint --all
+ podman checkpoint --leave-running --latest`,
}
)
diff --git a/cmd/podman/diff.go b/cmd/podman/diff.go
index 7d4cc1b58..e2d258ad4 100644
--- a/cmd/podman/diff.go
+++ b/cmd/podman/diff.go
@@ -46,7 +46,9 @@ var (
diffCommand.GlobalFlags = MainGlobalOpts
return diffCmd(&diffCommand)
},
- Example: "ID-NAME",
+ Example: `podman diff imageID
+ podman diff ctrID
+ podman diff --format json redis:alpine`,
}
)
diff --git a/cmd/podman/exec.go b/cmd/podman/exec.go
index 74808768e..9599be528 100644
--- a/cmd/podman/exec.go
+++ b/cmd/podman/exec.go
@@ -29,7 +29,9 @@ var (
execCommand.GlobalFlags = MainGlobalOpts
return execCmd(&execCommand)
},
- Example: "CONTAINER-NAME",
+ Example: `podman exec -it ctrID ls
+ podman exec -it -w /tmp myCtr pwd
+ podman exec --user root ctrID ls`,
}
)
diff --git a/cmd/podman/export.go b/cmd/podman/export.go
index 2ce8186a1..a593a4753 100644
--- a/cmd/podman/export.go
+++ b/cmd/podman/export.go
@@ -25,7 +25,8 @@ var (
exportCommand.GlobalFlags = MainGlobalOpts
return exportCmd(&exportCommand)
},
- Example: "CONTAINER",
+ Example: `podman export ctrID > myCtr.tar
+ podman export --output="myCtr.tar" ctrID`,
}
)
diff --git a/cmd/podman/import.go b/cmd/podman/import.go
index 32f79757b..053408ff3 100644
--- a/cmd/podman/import.go
+++ b/cmd/podman/import.go
@@ -25,7 +25,9 @@ var (
importCommand.GlobalFlags = MainGlobalOpts
return importCmd(&importCommand)
},
- Example: "TARBALL [REFERENCE]",
+ Example: `podman import http://example.com/ctr.tar url-image
+ cat ctr.tar | podman -q import --message "importing the ctr.tar tarball" - image-imported
+ cat ctr.tar | podman import -`,
}
)
diff --git a/cmd/podman/kill.go b/cmd/podman/kill.go
index d922cf721..1be4fa959 100644
--- a/cmd/podman/kill.go
+++ b/cmd/podman/kill.go
@@ -28,7 +28,9 @@ var (
killCommand.GlobalFlags = MainGlobalOpts
return killCmd(&killCommand)
},
- Example: "CONTAINER-NAME [CONTAINER-NAME ...]",
+ Example: `podman kill mywebserver
+ podman kill 860a4b23
+ podman kill --signal TERM ctrID`,
}
)
diff --git a/cmd/podman/login.go b/cmd/podman/login.go
index 3eacab54a..b02a4b3f9 100644
--- a/cmd/podman/login.go
+++ b/cmd/podman/login.go
@@ -112,7 +112,7 @@ func loginCmd(c *cliconfig.LoginValues) error {
}
// If no username and no password is specified, try to use existing ones.
- if c.Username == "" && password == "" {
+ if c.Username == "" && password == "" && userFromAuthFile != "" && passFromAuthFile != "" {
fmt.Println("Authenticating with existing credentials...")
if err := docker.CheckAuth(ctx, sc, userFromAuthFile, passFromAuthFile, server); err == nil {
fmt.Println("Existing credentials are valid. Already logged in to", server)
diff --git a/cmd/podman/logout.go b/cmd/podman/logout.go
index 5fecf814e..4108887f0 100644
--- a/cmd/podman/logout.go
+++ b/cmd/podman/logout.go
@@ -22,7 +22,9 @@ var (
logoutCommand.GlobalFlags = MainGlobalOpts
return logoutCmd(&logoutCommand)
},
- Example: "REGISTRY",
+ Example: `podman logout docker.io
+ podman logout --authfile authdir/myauths.json docker.io
+ podman logout --all`,
}
)
diff --git a/cmd/podman/pause.go b/cmd/podman/pause.go
index a840cbe49..94bb0edfe 100644
--- a/cmd/podman/pause.go
+++ b/cmd/podman/pause.go
@@ -28,7 +28,9 @@ var (
pauseCommand.GlobalFlags = MainGlobalOpts
return pauseCmd(&pauseCommand)
},
- Example: "CONTAINER-NAME [CONTAINER-NAME ...]",
+ Example: `podman pause mywebserver
+ podman pause 860a4b23
+ podman stop -a`,
}
)
diff --git a/cmd/podman/pod_start.go b/cmd/podman/pod_start.go
index 829fe2107..d093c51cf 100644
--- a/cmd/podman/pod_start.go
+++ b/cmd/podman/pod_start.go
@@ -26,7 +26,9 @@ var (
podStartCommand.GlobalFlags = MainGlobalOpts
return podStartCmd(&podStartCommand)
},
- Example: "POD-NAME [POD-NAME ...]",
+ Example: `podman pod start podID
+ podman pod start --latest
+ podman pod start --all`,
}
)
diff --git a/cmd/podman/pod_stats.go b/cmd/podman/pod_stats.go
index 7afab6be9..b1779532f 100644
--- a/cmd/podman/pod_stats.go
+++ b/cmd/podman/pod_stats.go
@@ -32,7 +32,9 @@ var (
podStatsCommand.GlobalFlags = MainGlobalOpts
return podStatsCmd(&podStatsCommand)
},
- Example: "[POD_NAME_OR_ID]",
+ Example: `podman stats -a --no-stream
+ podman stats --no-reset ctrID
+ podman stats --no-stream --format "table {{.ID}} {{.Name}} {{.MemUsage}}" ctrID`,
}
)
diff --git a/cmd/podman/pod_top.go b/cmd/podman/pod_top.go
index 411c782bd..790118496 100644
--- a/cmd/podman/pod_top.go
+++ b/cmd/podman/pod_top.go
@@ -33,7 +33,9 @@ the latest pod.
podTopCommand.GlobalFlags = MainGlobalOpts
return podTopCmd(&podTopCommand)
},
- Example: "POD-NAME [format descriptors]",
+ Example: `podman top ctrID
+ podman top --latest
+ podman top --latest pid seccomp args %C`,
}
)
diff --git a/cmd/podman/ps.go b/cmd/podman/ps.go
index 949f78a34..482e423b7 100644
--- a/cmd/podman/ps.go
+++ b/cmd/podman/ps.go
@@ -166,7 +166,9 @@ var (
psCommand.GlobalFlags = MainGlobalOpts
return psCmd(&psCommand)
},
- Example: "",
+ Example: `podman ps -a
+ podman ps -a --format "{{.ID}} {{.Image}} {{.Labels}} {{.Mounts}}"
+ podman ps --size --sort names`,
}
)
diff --git a/cmd/podman/sign.go b/cmd/podman/sign.go
index ac0d985f5..6e8f9ee95 100644
--- a/cmd/podman/sign.go
+++ b/cmd/podman/sign.go
@@ -32,7 +32,8 @@ var (
signCommand.GlobalFlags = MainGlobalOpts
return signCmd(&signCommand)
},
- Example: "IMAGE-NAME [IMAGE-NAME ...]",
+ Example: `podman sign --sign-by mykey imageID
+ podman sign --sign-by mykey --directory ./mykeydir imageID`,
}
)
diff --git a/cmd/podman/trust_set_show.go b/cmd/podman/trust_set_show.go
index f3d1cadce..0a4783d0a 100644
--- a/cmd/podman/trust_set_show.go
+++ b/cmd/podman/trust_set_show.go
@@ -26,7 +26,7 @@ var (
Use: "set",
Short: "Set default trust policy or a new trust policy for a registry",
Long: setTrustDescription,
- Example: "default | REGISTRY[/REPOSITORY]",
+ Example: "",
RunE: func(cmd *cobra.Command, args []string) error {
setTrustCommand.InputArgs = args
setTrustCommand.GlobalFlags = MainGlobalOpts
diff --git a/cmd/podman/umount.go b/cmd/podman/umount.go
index 20ea410c2..afa0e86db 100644
--- a/cmd/podman/umount.go
+++ b/cmd/podman/umount.go
@@ -31,7 +31,9 @@ An unmount can be forced with the --force flag.
umountCommand.GlobalFlags = MainGlobalOpts
return umountCmd(&umountCommand)
},
- Example: "CONTAINER-NAME-OR-ID",
+ Example: `podman umount ctrID
+ podman umount ctrID1 ctrID2 ctrID3
+ podman umount --all`,
}
)
diff --git a/cmd/podman/unpause.go b/cmd/podman/unpause.go
index c8f85cfd3..efd9a20a3 100644
--- a/cmd/podman/unpause.go
+++ b/cmd/podman/unpause.go
@@ -29,7 +29,8 @@ var (
unpauseCommand.GlobalFlags = MainGlobalOpts
return unpauseCmd(&unpauseCommand)
},
- Example: "CONTAINER-NAME [CONTAINER-NAME ...]",
+ Example: `podman unpause ctrID
+ podman unpause --all`,
}
)
diff --git a/cmd/podman/volume_create.go b/cmd/podman/volume_create.go
index fe5d69e0b..6c8a78922 100644
--- a/cmd/podman/volume_create.go
+++ b/cmd/podman/volume_create.go
@@ -26,7 +26,9 @@ be created at.`
volumeCreateCommand.GlobalFlags = MainGlobalOpts
return volumeCreateCmd(&volumeCreateCommand)
},
- Example: "[VOLUME-NAME]",
+ Example: `podman volume create myvol
+ podman volume create
+ podman volume create --label foo=bar myvol`,
}
)
diff --git a/cmd/podman/volume_inspect.go b/cmd/podman/volume_inspect.go
index 928ef37d0..3b4ba51d5 100644
--- a/cmd/podman/volume_inspect.go
+++ b/cmd/podman/volume_inspect.go
@@ -24,7 +24,9 @@ from JSON to a Go template.
volumeInspectCommand.GlobalFlags = MainGlobalOpts
return volumeInspectCmd(&volumeInspectCommand)
},
- Example: "[VOLUME-NAME ...]",
+ Example: `podman volume inspect myvol
+ podman volume inspect --all
+ podman volume inspect --format "{{.Driver}} {{.Scope}}" myvol`,
}
)