-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: Correct run
exit code 126 description
#5591
Conversation
The command to run inside the container is `/etc`. The semicolon is a statement terminator, which ends the command `docker run busybox /etc`, while `echo $?` prints the exit code of that full docker command. Having this mistake could confuse someone who thinks that `/etc; echo $?` is all run inside the container, which wouldn't help the reader understand the exit code of the `docker run` command itself. Signed-off-by: Noah Silas <[email protected]>
66a8a68
to
0c999fe
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5591 +/- ##
=======================================
Coverage 59.63% 59.63%
=======================================
Files 346 346
Lines 29214 29214
=======================================
Hits 17421 17421
Misses 10824 10824
Partials 969 969 |
Thank you! We should probably consider (but not for this PR) writing them as separate steps, i.e., run a container, then check the exit-code That said, it looks like with integration with $ docker run --rm busybox /etc
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/etc": permission denied: unknown.
$ echo $?
126
$ docker run --rm busybox nosuchcommand
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "nosuchcommand": executable file not found in $PATH: unknown.
$ echo $?
127
$ docker run --rm busybox /nosuchcommand
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: exec: "/nosuchcommand": stat /nosuchcommand: no such file or directory: unknown.
$ echo $?
127 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
let me bring this one in; I'll open a tracking ticket for the other bits
Thanks for the quick feedback and merge @thaJeztah! I appreciate the work you are doing here 😁 |
The command to run inside the container is
/etc
. The semicolon is a statement terminator, which ends the commanddocker run busybox /etc
, whileecho $?
prints the exit code of that full docker command.Having this mistake could confuse someone who thinks that
/etc; echo $?
is all run inside the container, which wouldn't help the reader understand the exit code of thedocker run
command itself.