Add 3rd chunk of Cobra examples

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>

Adds the third chunk of Cobra examples to the cli help.
As were putting together a release tomorrow, tried to
hit the heavy commands with this PR.

Signed-off-by: TomSweeneyRedHat <tsweeney@redhat.com>
This commit is contained in:
TomSweeneyRedHat
2019-02-17 11:14:10 -05:00
parent a99f4924d9
commit b62c0e703d
12 changed files with 34 additions and 15 deletions

View File

@ -40,7 +40,9 @@ var (
buildCommand.NameSpaceResults = &namespaceValues
return buildCmd(&buildCommand)
},
Example: "CONTEXT-DIRECTORY | URL",
Example: `podman build .
podman build --cert-dir ~/auth --creds=username:password -t imageName -f Dockerfile.simple .
podman build --layers --force-rm --tag imageName .`,
}
)

View File

@ -37,7 +37,8 @@ var (
playKubeCommand.GlobalFlags = MainGlobalOpts
return playKubeYAMLCmd(&playKubeCommand)
},
Example: "Kubernetes YAML file",
Example: `podman play kube demo.yml
podman play kube --cert-dir /mycertsdir --tls-verify=true --quiet myWebPod`,
}
)

View File

@ -27,7 +27,9 @@ var (
podStopCommand.GlobalFlags = MainGlobalOpts
return podStopCmd(&podStopCommand)
},
Example: "POD-NAME [POD-NAME ...]",
Example: `podman pod stop mywebserverpod
podman pod stop --latest
podman pod stop --timeout 0 490eb 3557fb`,
}
)

View File

@ -36,7 +36,9 @@ specified, the image with the 'latest' tag (if it exists) is pulled
pullCommand.GlobalFlags = MainGlobalOpts
return pullCmd(&pullCommand)
},
Example: "",
Example: `podman pull imageName
podman pull --cert-dir image/certs --authfile temp-auths/myauths.json docker://docker.io/myrepo/finaltest
podman pull fedora:latest`,
}
)

View File

@ -34,7 +34,9 @@ var (
pushCommand.GlobalFlags = MainGlobalOpts
return pushCmd(&pushCommand)
},
Example: "IMAGE DESTINATION",
Example: `podman push imageID docker://registry.example.com/repository:tag
podman push imageID oci-archive:/path/to/layout:image:tag
podman push --authfile temp-auths/myauths.json alpine docker://docker.io/myrepo/alpine`,
}
)

View File

@ -28,7 +28,9 @@ Running containers will not be removed without the -f option.
rmCommand.GlobalFlags = MainGlobalOpts
return rmCmd(&rmCommand)
},
Example: "",
Example: `podman rm imageID
podman rm mywebserver myflaskserver 860a4b23
podman rm --force --all`,
}
)

View File

@ -23,7 +23,9 @@ var (
rmiCommand.GlobalFlags = MainGlobalOpts
return rmiCmd(&rmiCommand)
},
Example: "IMAGE-NAME-OR-ID [...]",
Example: `podman rmi imageID
podman rmi --force alpine
podman rmi c4dfb1609ee2 93fd78260bd1 c0ed59d05ff7`,
}
)

View File

@ -30,7 +30,9 @@ var (
runCommand.GlobalFlags = MainGlobalOpts
return runCmd(&runCommand)
},
Example: "IMAGE [COMMAND [ARG...]]",
Example: `podman run imageID ls -alF /etc
podman run --net=host imageID dnf -y install java
podman run --volume /var/hostdir:/var/ctrdir -i -t fedora /bin/bash`,
}
)

View File

@ -28,7 +28,9 @@ var (
startCommand.GlobalFlags = MainGlobalOpts
return startCmd(&startCommand)
},
Example: "CONTAINER-NAME [CONTAINER-NAME ...]",
Example: `podman start --latest
podman start 860a4b231279 5421ab43b45
podman start --interactive --attach imageID`,
}
)

View File

@ -31,7 +31,9 @@ var (
stopCommand.GlobalFlags = MainGlobalOpts
return stopCmd(&stopCommand)
},
Example: "CONTAINER-NAME [CONTAINER-NAME ...]",
Example: `podman stop ctrID
podman stop --latest
podman stop --timeout 2 mywebserver 6e534f14da9d`,
}
)

View File

@ -41,9 +41,9 @@ Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and
podman start mywebserver
podman start 860a4b23 5421ab4
podman start 860a4b231279 5421ab43b45
podman start -i -a 860a4b23
podman start --interactive --attach 860a4b231279
podman start -i -l

View File

@ -32,11 +32,11 @@ Timeout to wait before forcibly stopping the container
podman stop mywebserver
podman stop 860a4b23
podman stop 860a4b235279
podman stop mywebserver 860a4b23
podman stop mywebserver 860a4b235279
podman stop --timeout 2 860a4b23
podman stop --timeout 2 860a4b235279
podman stop -a