Docker CLI

docker wait

Wait for completion and print container exit codes. The printed exit code is not the exit status of the wait CLI process. Use finite jobs to avoid indefinite waiting. Example assumes an existing container you created in the approved disposable lab; confirm context and ownership before use.

Formal Syntax & Structure

docker syntaxdocker
docker wait CONTAINER [CONTAINER...]

Parameters & Attributes

NameTypeDescription
CONTAINERstringExisting container name or ID.

Return Value

CLI output

Container exit code as text.

Working Example

Example Snippetdocker
docker wait bm02-job
Docker Reference