LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

docker-stop

Stop one or more running Docker containers (alias)

TLDR

Stop a container (alias of `docker container stop`)
$ docker stop mycontainer
copy
Stop multiple containers
$ docker stop container1 container2
copy
Stop with a custom timeout (seconds before SIGKILL)
$ docker stop --timeout 30 mycontainer
copy
Send a specific stop signal
$ docker stop --signal SIGINT mycontainer
copy

SYNOPSIS

docker stop [options] container [container...]

DESCRIPTION

docker stop is an alias for `docker container stop`. It stops one or more running containers by sending a termination signal (`SIGTERM` by default, or the container's `STOPSIGNAL` / `--signal`) and waiting for a graceful shutdown. If the process does not exit within the timeout (default 10 seconds on Linux unless configured otherwise), `SIGKILL` is sent.For full option details, prefer the canonical form documented under `docker container stop`.

PARAMETERS

-t, --timeout seconds

Seconds to wait before killing the container after the stop signal. Set to `-1` to wait indefinitely.
-s, --signal signal
Signal to send to the container (e.g. `SIGTERM`, `SIGINT`).

INSTALL

sudo apt install docker-cli
copy
sudo dnf install docker-cli
copy
sudo pacman -S docker
copy
sudo apk add docker-cli
copy
sudo zypper install docker
copy
brew install docker
copy
nix profile install nixpkgs#docker
copy

SEE ALSO

RESOURCES

Copied to clipboard
Kai