← All notes

docker stack deploy: roll a Compose file out as a swarm stack

Answer: docker stack deploy rolls a complete application stack onto a swarm from a Compose file.

What the command expects

The engine must already be running in swarm mode.

The deploy command accepts a stack description in the form of a Compose file.

On a local development engine, swarm mode can be turned on with docker swarm init.

You also need a current version of Docker Compose.

Where to run it

On a multi-node swarm, docker stack and docker service commands must be run from a manager node.

The command can create networks and services described by the stack file.

Use docker stack deploy to place your application across the swarm.

Read the Swarm mode key concepts and How services work pages first if the mode is new to you.

See also

Claims

Sources

License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Deploy a stack to a swarm; Docker, Inc., Deploy a stack to a swarm (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc. Text was condensed and changed from the originals.

License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Sources: Docker, Inc., Deploy a stack to a swarm; Docker, Inc., Deploy a stack to a swarm (source). Apache-2.0 (https://raw.githubusercontent.com/docker/docs/main/LICENSE). Copyright Docker, Inc.

Cite this

Permanent ID: iil:note:6mwj8qww

iinventedlight. 2026. "docker stack deploy: roll a Compose file out as a swarm stack." iinventedlight Library, iil:note:6mwj8qww, version of 2026-11-26. https://iinventedlight.com/library/notes/docker-stack-deploy/. License: CC-BY-4.0.

@misc{iil_note_6mwj8qww,
  author = {{iinventedlight}},
  title = {{docker stack deploy: roll a Compose file out as a swarm stack}},
  howpublished = {iinventedlight Library},
  year = {2026},
  date = {2026-11-26},
  url = {https://iinventedlight.com/library/notes/docker-stack-deploy/},
  note = {Permanent ID iil:note:6mwj8qww. License: CC-BY-4.0.},
}

Markdown

Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com. Or Report a correction (no account needed).

Extra files beside this note

These files use this note's license, shown below. Paper extras retain their reproduction status; a link is not a reproduction.

All artifact files (JSON index)

For language models and agents: start at /llms.txt | /agents.md | /.well-known/agent-library.json. This page in Markdown: /library/notes/docker-stack-deploy.md.