Learning-Ocean
  • Ansible
  • Docker
  • Kubernetes
  • Docker-Compose
  • Docker-Swarm
  • Terraform
  • Shell Script
  • Subscribe
  • About Us
Docker
  • home
  • introduction and architecture
  • installation
  • command overview
  • create first container
  • container run
  • container start and stop
  • docker inspect
  • docker logs
  • container restart and rename
  • port mapping
  • container attach
  • container kill
  • container wait
  • container pause/unpause
  • container prune
  • container create
  • container diff
  • container copy
  • container import/export
  • docker commit
  • image push/pull/tag
  • image list/history
  • image rm, inspect, prune
  • image save/load
  • layered architecture and dockerfiles
  • dockerfile
  • dockerfile - label,env,workdir
  • dockerfile - add,copy,user
  • dockerfile - cmd
  • dockerfile - entrypoint
  • docker volume
  • docker volume - create
  • docker volume - remove, prune
  • bind mount
  • docker networking
  • docker networking - dns enable
  • docker host network
  • docker none network
  • docker network - connect, disconnect
  • docker network - remove, prune
  • docker registry/repository (insecure)
  • docker secure registry
  • docker registry - basic authentication

Docker Container Wait


Block until one or more containers stop, then print their exit codes

Syntax

$ docker contaienr wait CONTAINER [CONTAINER...]


Examples


Run docker wait, which should block until the container exits.

$ docker wait container_name

In another terminal, stop the first container. The docker wait command above returns the exit code.

$ docker stop container_name


docker-container-wait

Other terminal:

docker-container-wait



PreviousNext