diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-06-25 21:40:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-25 21:40:38 +0200 |
commit | 2476e7b1bc6c7f11307df20a71492179473d9a22 (patch) | |
tree | 1ca86a1bb3d0127ae8267467e8dff19c68046720 /docs | |
parent | 96ccc2edf597a191fe03eff98b2905788a26553f (diff) | |
parent | 90b835db69d589de559462d988cb3fae5cf1ef49 (diff) | |
download | podman-2476e7b1bc6c7f11307df20a71492179473d9a22.tar.gz podman-2476e7b1bc6c7f11307df20a71492179473d9a22.tar.bz2 podman-2476e7b1bc6c7f11307df20a71492179473d9a22.zip |
Merge pull request #3427 from mheon/openstack_backports
Openstack backports
Diffstat (limited to 'docs')
-rw-r--r-- | docs/podman-exec.1.md | 34 | ||||
-rw-r--r-- | docs/podman-run.1.md | 17 | ||||
-rw-r--r-- | docs/podman.1.md | 11 |
3 files changed, 45 insertions, 17 deletions
diff --git a/docs/podman-exec.1.md b/docs/podman-exec.1.md index 77317b0ca..906109f87 100644 --- a/docs/podman-exec.1.md +++ b/docs/podman-exec.1.md @@ -46,6 +46,40 @@ The default working directory for running binaries within a container is the roo The image developer can set a different default with the WORKDIR instruction, which can be overridden when creating the container. +## Exit Status + +The exit code from `podman exec` gives information about why the command within the container failed to run or why it exited. When `podman exec` exits with a +non-zero code, the exit codes follow the `chroot` standard, see below: + +**_125_** if the error is with podman **_itself_** + + $ podman exec --foo ctrID /bin/sh; echo $? + Error: unknown flag: --foo + 125 + +**_126_** if the **_contained command_** cannot be invoked + + $ podman exec ctrID /etc; echo $? + Error: container_linux.go:346: starting container process caused "exec: \"/etc\": permission denied": OCI runtime error + 126 + +**_127_** if the **_contained command_** cannot be found + + $ podman exec ctrID foo; echo $? + Error: container_linux.go:346: starting container process caused "exec: \"foo\": executable file not found in $PATH": OCI runtime error + 127 + +**_Exit code_** of **_contained command_** otherwise + + $ podman exec ctrID /bin/sh -c 'exit 3' + # 3 + +## EXAMPLES + +$ podman exec -it ctrID ls +$ podman exec -it -w /tmp myCtr pwd +$ podman exec --user root ctrID ls + ## SEE ALSO podman(1), podman-run(1) diff --git a/docs/podman-run.1.md b/docs/podman-run.1.md index 8b96ea6d9..ee51c3bb8 100644 --- a/docs/podman-run.1.md +++ b/docs/podman-run.1.md @@ -819,28 +819,25 @@ the exit codes follow the `chroot` standard, see below: **_125_** if the error is with podman **_itself_** $ podman run --foo busybox; echo $? - # flag provided but not defined: --foo - See 'podman run --help'. - 125 + Error: unknown flag: --foo + 125 **_126_** if the **_contained command_** cannot be invoked $ podman run busybox /etc; echo $? - # exec: "/etc": permission denied - podman: Error response from daemon: Contained command could not be invoked - 126 + Error: container_linux.go:346: starting container process caused "exec: \"/etc\": permission denied": OCI runtime error + 126 **_127_** if the **_contained command_** cannot be found $ podman run busybox foo; echo $? - # exec: "foo": executable file not found in $PATH - podman: Error response from daemon: Contained command not found or does not exist - 127 + Error: container_linux.go:346: starting container process caused "exec: \"foo\": executable file not found in $PATH": OCI runtime error + 127 **_Exit code_** of **_contained command_** otherwise $ podman run busybox /bin/sh -c 'exit 3' - # 3 + 3 ## EXAMPLES diff --git a/docs/podman.1.md b/docs/podman.1.md index a73ebb55e..9be41c3f6 100644 --- a/docs/podman.1.md +++ b/docs/podman.1.md @@ -98,24 +98,21 @@ the exit codes follow the `chroot` standard, see below: **_125_** if the error is with podman **_itself_** $ podman run --foo busybox; echo $? - # flag provided but not defined: --foo - See 'podman run --help'. + Error: unknown flag: --foo 125 **_126_** if executing a **_container command_** and the the **_command_** cannot be invoked $ podman run busybox /etc; echo $? - # exec: "/etc": permission denied - podman: Error response from daemon: Contained command could not be invoked + Error: container_linux.go:346: starting container process caused "exec: \"/etc\": permission denied": OCI runtime error 126 **_127_** if executing a **_container command_** and the the **_command_** cannot be found $ podman run busybox foo; echo $? - # exec: "foo": executable file not found in $PATH - podman: Error response from daemon: Contained command not found or does not exist + Error: container_linux.go:346: starting container process caused "exec: \"foo\": executable file not found in $PATH": OCI runtime error 127 -**_Exit code_** of **_container command_** otherwise +**_Exit code_** of **_contained command_** otherwise $ podman run busybox /bin/sh -c 'exit 3' # 3 |