LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

docker-compose-stop

stop Compose services without removing containers

TLDR

Stop all running services
$ docker compose stop
copy
Stop specific services
$ docker compose stop [service1] [service2]
copy
Stop with a custom timeout in seconds
$ docker compose stop -t [30]
copy
Use a specific compose file
$ docker compose -f [path/to/compose.yaml] stop
copy

SYNOPSIS

docker compose stop [options] [SERVICE...]

DESCRIPTION

docker compose stop stops running containers for one or more services defined in a Compose project without removing them. Stopped containers keep their configuration and volumes and can be started again with docker compose start.Unlike docker compose down, this command does not remove containers, networks, or volumes. It is useful when you want a temporary stop while preserving the ability to resume the same containers quickly.

PARAMETERS

-t, --timeout seconds

Shutdown timeout in seconds before killing containers

INSTALL

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

SEE ALSO

RESOURCES

Copied to clipboard
Kai