summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-02-19 19:48:05 +0100
committerGitHub <noreply@github.com>2019-02-19 19:48:05 +0100
commit82ae36c15726a4adb3242938ed2396be30bd479a (patch)
treec083d8e599ac24abb298597de8dd7c0ee41e54d8
parent10ffa3ff82ff28e7761c23cda5a5c16d83e0d0ce (diff)
parent675a202a1b560fdc08a489b37e6765a2b8cc4dd0 (diff)
downloadpodman-82ae36c15726a4adb3242938ed2396be30bd479a.tar.gz
podman-82ae36c15726a4adb3242938ed2396be30bd479a.tar.bz2
podman-82ae36c15726a4adb3242938ed2396be30bd479a.zip
Merge pull request #2363 from TomSweeneyRedHat/dev/tsweeney/cobraex5
Fifth chunk of Cobra Examples
-rw-r--r--cmd/podman/generate_kube.go4
-rw-r--r--cmd/podman/images.go4
-rw-r--r--cmd/podman/logs.go4
-rw-r--r--cmd/podman/pod_kill.go4
-rw-r--r--cmd/podman/pod_pause.go4
-rw-r--r--cmd/podman/pod_restart.go4
-rw-r--r--cmd/podman/pod_unpause.go4
-rw-r--r--cmd/podman/port.go4
-rw-r--r--cmd/podman/volume_rm.go4
-rw-r--r--cmd/podman/wait.go4
-rw-r--r--docs/podman-logs.1.md4
-rw-r--r--docs/podman-pod-restart.1.md4
-rw-r--r--docs/podman-port.1.md8
13 files changed, 38 insertions, 18 deletions
diff --git a/cmd/podman/generate_kube.go b/cmd/podman/generate_kube.go
index ddb2daa34..15f374c73 100644
--- a/cmd/podman/generate_kube.go
+++ b/cmd/podman/generate_kube.go
@@ -25,7 +25,9 @@ var (
containerKubeCommand.GlobalFlags = MainGlobalOpts
return generateKubeYAMLCmd(&containerKubeCommand)
},
- Example: "CONTAINER|POD-NAME",
+ Example: `podman generate kube ctrID
+ podman generate kube podID
+ podman generate kube --service podID`,
}
)
diff --git a/cmd/podman/images.go b/cmd/podman/images.go
index b269f6440..56810eaeb 100644
--- a/cmd/podman/images.go
+++ b/cmd/podman/images.go
@@ -96,7 +96,9 @@ var (
imagesCommand.GlobalFlags = MainGlobalOpts
return imagesCmd(&imagesCommand)
},
- Example: "",
+ Example: `podman images --format json
+ podman images --sort repository --format "table {{.ID}} {{.Repository}} {{.Tag}}"
+ podman images --filter dangling=true`,
}
)
diff --git a/cmd/podman/logs.go b/cmd/podman/logs.go
index 6962a1f6d..4cf3b7cb8 100644
--- a/cmd/podman/logs.go
+++ b/cmd/podman/logs.go
@@ -26,7 +26,9 @@ var (
logsCommand.GlobalFlags = MainGlobalOpts
return logsCmd(&logsCommand)
},
- Example: "CONTAINER",
+ Example: `podman logs ctrID
+ podman logs --tail 2 mywebserver
+ podman logs --follow=true --since 10m ctrID`,
}
)
diff --git a/cmd/podman/pod_kill.go b/cmd/podman/pod_kill.go
index febc820cd..f6991a1c3 100644
--- a/cmd/podman/pod_kill.go
+++ b/cmd/podman/pod_kill.go
@@ -24,7 +24,9 @@ var (
podKillCommand.GlobalFlags = MainGlobalOpts
return podKillCmd(&podKillCommand)
},
- Example: "[POD_NAME_OR_ID]",
+ Example: `podman pod kill podID
+ podman pod kill --signal TERM mywebserver
+ podman pod kill --latest`,
}
)
diff --git a/cmd/podman/pod_pause.go b/cmd/podman/pod_pause.go
index 2059727ae..ea2c80f7b 100644
--- a/cmd/podman/pod_pause.go
+++ b/cmd/podman/pod_pause.go
@@ -21,7 +21,9 @@ var (
podPauseCommand.GlobalFlags = MainGlobalOpts
return podPauseCmd(&podPauseCommand)
},
- Example: "POD-NAME|POD-ID [POD-NAME|POD-ID ...]",
+ Example: `podman pod pause podID1 podID2
+ podman pod pause --latest
+ podman pod pause --all`,
}
)
diff --git a/cmd/podman/pod_restart.go b/cmd/podman/pod_restart.go
index f75d84956..2815af0c6 100644
--- a/cmd/podman/pod_restart.go
+++ b/cmd/podman/pod_restart.go
@@ -22,7 +22,9 @@ var (
podRestartCommand.GlobalFlags = MainGlobalOpts
return podRestartCmd(&podRestartCommand)
},
- Example: "POD-NAME|POD-ID [POD-NAME|POD-ID ...]",
+ Example: `podman pod restart podID1 podID2
+ podman pod restart --latest
+ podman pod restart --all`,
}
)
diff --git a/cmd/podman/pod_unpause.go b/cmd/podman/pod_unpause.go
index a917919c3..6c131b92c 100644
--- a/cmd/podman/pod_unpause.go
+++ b/cmd/podman/pod_unpause.go
@@ -22,7 +22,9 @@ var (
podUnpauseCommand.GlobalFlags = MainGlobalOpts
return podUnpauseCmd(&podUnpauseCommand)
},
- Example: "POD-NAME|POD-ID [POD-NAME|POD-ID ...]",
+ Example: `podman pod unpause podID1 podID2
+ podman pod unpause --all
+ podman pod unpause --latest`,
}
)
diff --git a/cmd/podman/port.go b/cmd/podman/port.go
index be84da065..581371e4f 100644
--- a/cmd/podman/port.go
+++ b/cmd/podman/port.go
@@ -28,7 +28,9 @@ var (
portCommand.GlobalFlags = MainGlobalOpts
return portCmd(&portCommand)
},
- Example: "CONTAINER-NAME [mapping]",
+ Example: `podman port --all
+ podman port ctrID 80/tcp
+ podman port --latest 80`,
}
)
diff --git a/cmd/podman/volume_rm.go b/cmd/podman/volume_rm.go
index f301749e9..14847a949 100644
--- a/cmd/podman/volume_rm.go
+++ b/cmd/podman/volume_rm.go
@@ -28,7 +28,9 @@ not being used by any containers. To remove the volumes anyways, use the
volumeRmCommand.GlobalFlags = MainGlobalOpts
return volumeRmCmd(&volumeRmCommand)
},
- Example: "[VOLUME-NAME ...]",
+ Example: `podman volume rm myvol1 myvol2
+ podman volume rm --all
+ podman volume rm --force myvol`,
}
)
diff --git a/cmd/podman/wait.go b/cmd/podman/wait.go
index 616c8feb5..c6e6240f3 100644
--- a/cmd/podman/wait.go
+++ b/cmd/podman/wait.go
@@ -28,7 +28,9 @@ var (
waitCommand.GlobalFlags = MainGlobalOpts
return waitCmd(&waitCommand)
},
- Example: "CONTAINER-NAME [CONTAINER-NAME ...]",
+ Example: `podman wait --latest
+ podman wait --interval 5000 ctrID
+ podman wait ctrID1 ctrID2`,
}
)
diff --git a/docs/podman-logs.1.md b/docs/podman-logs.1.md
index 71a798bc0..6b37aed9e 100644
--- a/docs/podman-logs.1.md
+++ b/docs/podman-logs.1.md
@@ -61,7 +61,7 @@ podman logs --tail 2 b3f2436bdb97
To view a containers logs since a certain time:
```
-podman logs 224c375f27cd --since 2017-08-07T10:10:09.055837383-04:00 myserver
+podman logs --since 2017-08-07T10:10:09.055837383-04:00 myserver
1:M 07 Aug 14:10:09.055 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
1:M 07 Aug 14:10:09.055 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
@@ -72,7 +72,7 @@ podman logs 224c375f27cd --since 2017-08-07T10:10:09.055837383-04:00 myserver
To view a container's logs generated in the last 10 minutes:
```
-podman logs 224c375f27cd --since 10m myserver
+podman logs --since 10m myserver
1:M 07 Aug 14:10:09.055 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
1:M 07 Aug 14:10:09.055 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
diff --git a/docs/podman-pod-restart.1.md b/docs/podman-pod-restart.1.md
index 17fb4ed4c..1cccd3382 100644
--- a/docs/podman-pod-restart.1.md
+++ b/docs/podman-pod-restart.1.md
@@ -24,6 +24,7 @@ Instead of providing the pod name or ID, restart the last created pod.
## EXAMPLE
+```
podman pod restart mywebserverpod
cc8f0bea67b1a1a11aec1ecd38102a1be4b145577f21fc843c7c83b77fc28907
@@ -31,8 +32,6 @@ podman pod restart 490eb 3557fb
490eb241aaf704d4dd2629904410fe4aa31965d9310a735f8755267f4ded1de5
3557fbea6ad61569de0506fe037479bd9896603c31d3069a6677f23833916fab
-3557fbea6ad61569de0506fe037479bd9896603c31d3069a6677f23833916fab
-
podman pod restart --latest
3557fbea6ad61569de0506fe037479bd9896603c31d3069a6677f23833916fab
@@ -42,6 +41,7 @@ podman pod restart --all
490eb241aaf704d4dd2629904410fe4aa31965d9310a735f8755267f4ded1de5
70c358daecf71ef9be8f62404f926080ca0133277ef7ce4f6aa2d5af6bb2d3e9
cc8f0bea67b1a1a11aec1ecd38102a1be4b145577f21fc843c7c83b77fc28907
+```
## SEE ALSO
podman-pod(1), podman-pod-start(1), podman-restart(1)
diff --git a/docs/podman-port.1.md b/docs/podman-port.1.md
index 874ea5036..25a8eceb5 100644
--- a/docs/podman-port.1.md
+++ b/docs/podman-port.1.md
@@ -25,7 +25,7 @@ to run containers such as CRI-O, the last started container could be from either
List all port mappings
```
-#podman port -a
+# podman port -a
b4d2f05432e482e017b1a4b2eae15fa7b4f6fb7e9f65c1bde46294fdef285906
80/udp -> 0.0.0.0:44327
80/tcp -> 0.0.0.0:44327
@@ -34,21 +34,21 @@ b4d2f05432e482e017b1a4b2eae15fa7b4f6fb7e9f65c1bde46294fdef285906
List port mappings for a specific container
```
-#podman port b4d2f054
+# podman port b4d2f054
80/udp -> 0.0.0.0:44327
80/tcp -> 0.0.0.0:44327
#
```
List the port mappings for the latest container and port 80
```
-#podman port b4d2f054 80
+# podman port b4d2f054 80
0.0.0.0:44327
#
```
List the port mappings for a specific container for port 80 and the tcp protocol.
```
-#podman port b4d2f054 80/tcp
+# podman port b4d2f054 80/tcp
0.0.0.0:44327
#
```