docker stack deploy (original) (raw)
Description | Deploy a new stack or update an existing stack |
---|---|
Usage | docker stack deploy [OPTIONS] STACK |
AliasesAn alias is a short or memorable alternative for a longer command. | docker stack up |
SwarmThis command works with the Swarm orchestrator.
Create and update a stack from a compose
file on the swarm.
Note
This is a cluster management command, and must be executed on a swarm manager node. To learn about managers and workers, refer to theSwarm mode section in the documentation.
Option | Default | Description |
---|---|---|
-c, --compose-file | API 1.25+Path to a Compose file, or - to read from stdin | |
-d, --detach | true | Exit immediately instead of waiting for the stack services to converge |
--prune | API 1.27+Prune services that are no longer referenced | |
-q, --quiet | Suppress progress output | |
--resolve-image | always | API 1.30+Query the registry to resolve image digest and supported platforms (always, changed, never) |
--with-registry-auth | Send registry authentication details to Swarm agents |
Compose file (--compose-file)
The deploy
command supports Compose file version 3.0
and above.
The Compose file can also be provided as standard input with --compose-file -
:
If your configuration is split between multiple Compose files, e.g. a base configuration and environment-specific overrides, you can provide multiple--compose-file
flags.
You can verify that the services were correctly created: