Skip to content

Commit

Permalink
docs: Correct run exit code 126 description
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
noahsilas committed Nov 4, 2024
1 parent 2995631 commit 0c999fe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/reference/run.md
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ See 'docker run --help'.
### 126

Exit code `126` indicates that the specified contained command can't be invoked.
The container command in the following example is: `/etc; echo $?`.
The container command in the following example is: `/etc`.

```console
$ docker run busybox /etc; echo $?
Expand Down

0 comments on commit 0c999fe

Please sign in to comment.