mirror of
https://github.com/containers/podman
synced 2024-10-21 01:34:37 +00:00
Fifth chunk of Cobra Examples
Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com> The fifth and final chunk of examples for the Cobra examples in the CLI help output. Also includes a few man page touchups. Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
This commit is contained in:
parent
228d1cbcd3
commit
675a202a1b
|
@ -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`,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -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`,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -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`,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -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`,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -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`,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -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`,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -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`,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -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`,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -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`,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -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`,
|
||||
}
|
||||
)
|
||||
|
||||
|
|
|
@ -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'.
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
#
|
||||
```
|
||||
|
|
Loading…
Reference in a new issue