summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-02-18 22:14:57 +0100
committerGitHub <noreply@github.com>2019-02-18 22:14:57 +0100
commit228d1cbcd372b086669e35c1237fc5064b24ea7d (patch)
treebf8b47a997c76db0121295314ab1740411afeedf
parentc9b13133cdd9f59a000d40fce357c33919ef7032 (diff)
parent64853710e87ba124561653cb5d62ca3a653b4170 (diff)
downloadpodman-228d1cbcd372b086669e35c1237fc5064b24ea7d.tar.gz
podman-228d1cbcd372b086669e35c1237fc5064b24ea7d.tar.bz2
podman-228d1cbcd372b086669e35c1237fc5064b24ea7d.zip
Merge pull request #2361 from TomSweeneyRedHat/dev/tsweeney/cobraex4
Add 4th chunk of Cobra Examples
-rw-r--r--cmd/podman/cleanup.go4
-rw-r--r--cmd/podman/restart.go4
-rw-r--r--cmd/podman/restore.go4
-rw-r--r--cmd/podman/runlabel.go6
-rw-r--r--cmd/podman/save.go4
-rw-r--r--cmd/podman/search.go4
-rw-r--r--cmd/podman/stats.go4
-rw-r--r--cmd/podman/tag.go4
-rw-r--r--cmd/podman/top.go4
-rw-r--r--cmd/podman/varlink.go3
10 files changed, 30 insertions, 11 deletions
diff --git a/cmd/podman/cleanup.go b/cmd/podman/cleanup.go
index e465a30e6..89a4ba050 100644
--- a/cmd/podman/cleanup.go
+++ b/cmd/podman/cleanup.go
@@ -26,7 +26,9 @@ var (
cleanupCommand.GlobalFlags = MainGlobalOpts
return cleanupCmd(&cleanupCommand)
},
- Example: "CONTAINER-NAME [CONTAINER-NAME ...]",
+ Example: `podman container cleanup --latest
+ podman container cleanup ctrID1 ctrID2 ctrID3
+ podman container cleanup --all`,
}
)
diff --git a/cmd/podman/restart.go b/cmd/podman/restart.go
index 235107b5c..97b689c02 100644
--- a/cmd/podman/restart.go
+++ b/cmd/podman/restart.go
@@ -26,7 +26,9 @@ var (
restartCommand.GlobalFlags = MainGlobalOpts
return restartCmd(&restartCommand)
},
- Example: "CONTAINER [CONTAINER ...]",
+ Example: `podman restart ctrID
+ podman restart --latest
+ podman restart ctrID1 ctrID2`,
}
)
diff --git a/cmd/podman/restore.go b/cmd/podman/restore.go
index 556cdb774..2911bbdd6 100644
--- a/cmd/podman/restore.go
+++ b/cmd/podman/restore.go
@@ -29,7 +29,9 @@ var (
restoreCommand.GlobalFlags = MainGlobalOpts
return restoreCmd(&restoreCommand)
},
- Example: "CONTAINER-NAME [CONTAINER-NAME ...]",
+ Example: `podman container restore ctrID
+ podman container restore --latest
+ podman container restore --all`,
}
)
diff --git a/cmd/podman/runlabel.go b/cmd/podman/runlabel.go
index f1c61ebda..54f210e62 100644
--- a/cmd/podman/runlabel.go
+++ b/cmd/podman/runlabel.go
@@ -31,7 +31,9 @@ Executes a command as described by a container image label.
runlabelCommand.GlobalFlags = MainGlobalOpts
return runlabelCmd(&runlabelCommand)
},
- Example: "",
+ Example: `podman container runlabel run imageID
+ podman container runlabel --pull install imageID arg1 arg2
+ podman container runlabel --display run myImage`,
}
)
@@ -49,7 +51,7 @@ func init() {
flags.StringVar(&runlabelCommand.Opt2, "opt2", "", "Optional parameter to pass for install")
flags.StringVar(&runlabelCommand.Opt3, "opt3", "", "Optional parameter to pass for install")
flags.MarkHidden("opt1")
- flags.MarkHidden("opt3")
+ flags.MarkHidden("opt2")
flags.MarkHidden("opt3")
flags.BoolVarP(&runlabelCommand.Pull, "pull", "p", false, "Pull the image if it does not exist locally prior to executing the label contents")
diff --git a/cmd/podman/save.go b/cmd/podman/save.go
index 1ae1bc872..ff4a22453 100644
--- a/cmd/podman/save.go
+++ b/cmd/podman/save.go
@@ -41,7 +41,9 @@ var (
saveCommand.GlobalFlags = MainGlobalOpts
return saveCmd(&saveCommand)
},
- Example: "",
+ Example: `podman save --quiet -o myimage.tar imageID
+ podman save --format docker-dir -o ubuntu-dir ubuntu
+ podman save > alpine-all.tar alpine:latest`,
}
)
diff --git a/cmd/podman/search.go b/cmd/podman/search.go
index 858addff6..c8b64039a 100644
--- a/cmd/podman/search.go
+++ b/cmd/podman/search.go
@@ -36,7 +36,9 @@ var (
searchCommand.GlobalFlags = MainGlobalOpts
return searchCmd(&searchCommand)
},
- Example: "TERM",
+ Example: `podman search --filter=is-official --limit 3 alpine
+ podman search registry.fedoraproject.org/ # only works with v2 registries
+ podman search --format "table {{.Index}} {{.Name}}" registry.fedoraproject.org/fedora`,
}
)
diff --git a/cmd/podman/stats.go b/cmd/podman/stats.go
index af9bbad0e..642e54f49 100644
--- a/cmd/podman/stats.go
+++ b/cmd/podman/stats.go
@@ -41,7 +41,9 @@ var (
statsCommand.GlobalFlags = MainGlobalOpts
return statsCmd(&statsCommand)
},
- Example: "",
+ Example: `podman stats --all --no-stream
+ podman stats ctrID
+ podman stats --no-stream --format "table {{.ID}} {{.Name}} {{.MemUsage}}" ctrID`,
}
)
diff --git a/cmd/podman/tag.go b/cmd/podman/tag.go
index 135c2f7a0..422e9dbf6 100644
--- a/cmd/podman/tag.go
+++ b/cmd/podman/tag.go
@@ -20,7 +20,9 @@ var (
tagCommand.GlobalFlags = MainGlobalOpts
return tagCmd(&tagCommand)
},
- Example: "IMAGE-NAME [IMAGE-NAME ...]",
+ Example: `podman tag 0e3bbc2 fedora:latest
+ podman tag imageID:latest myNewImage:newTag
+ podman tag httpd myregistryhost:5000/fedora/httpd:v2`,
}
)
diff --git a/cmd/podman/top.go b/cmd/podman/top.go
index 51b813e5a..d85e1be53 100644
--- a/cmd/podman/top.go
+++ b/cmd/podman/top.go
@@ -42,7 +42,9 @@ the latest container.
topCommand.GlobalFlags = MainGlobalOpts
return topCmd(&topCommand)
},
- Example: "CONTAINER-NAME [format descriptors]",
+ Example: `podman top ctrID
+ podman top --latest
+ podman top ctrID pid seccomp args %C`,
}
)
diff --git a/cmd/podman/varlink.go b/cmd/podman/varlink.go
index ce54cfa85..d9c6cdb47 100644
--- a/cmd/podman/varlink.go
+++ b/cmd/podman/varlink.go
@@ -32,7 +32,8 @@ var (
varlinkCommand.GlobalFlags = MainGlobalOpts
return varlinkCmd(&varlinkCommand)
},
- Example: "VARLINK_URI",
+ Example: `podman varlink unix:/run/podman/io.podman
+ podman varlink --timeout 5000 unix:/run/podman/io.podman`,
}
)