Thank you for attending DockerCon 2020!Watch the recordings.
✕
Explore
Pricing
Sign In
Explore
swarm
product logo

swarm

Docker Official Images
Classic Swarm is no longer actively developed; use Swarm mode built into the Docker Engine instead
50M+
Container Linux x86-64 Application Infrastructure Application Frameworks Official Image
Copy and paste to pull this image
View Available Tags
DescriptionReviewsTags

DEPRECATION NOTICE

Classic Swarm has been archived and is no longer actively developed. You may want to use the Swarm mode built into the Docker Engine instead, or another orchestration system.

(https://github.com/docker/classicswarm#readme)

Quick reference

  • Maintained by: Docker, Inc.

  • Where to get help: the Docker Community Forums, the Docker Community Slack, or Stack Overflow

Supported tags and respective Dockerfile links

  • 1.2.9, latest

Quick reference (cont.)

  • Where to file issues: https://github.com/docker/swarm-library-image/issues

  • Supported architectures: (more info) amd64

  • Published image artifact details: repo-info repo's repos/swarm/ directory (history) (image metadata, transfer size, etc)

  • Image updates: official-images PRs with label library/swarm
    official-images repo's library/swarm file (history)

  • Source of this description: docs repo's swarm/ directory (history)

Swarm: a Docker-native clustering system

logo

swarm is a simple tool which controls a cluster of Docker hosts and exposes it as a single "virtual" host.

swarm uses the standard Docker API as its frontend, which means any tool which speaks Docker can control swarm transparently: dokku, docker-compose, krane, flynn, deis, docker-ui, shipyard, drone.io, Jenkins... and of course the Docker client itself.

Like the other Docker projects, swarm follows the "batteries included but removable" principle. It ships with a simple scheduling backend out of the box, and as initial development settles, an API will develop to enable pluggable backends. The goal is to provide a smooth out-of-box experience for simple use cases, and allow swapping in more powerful backends, like Mesos, for large scale production deployments.

Example usage

# create a cluster
$ docker run --rm swarm create
6856663cdefdec325839a4b7e1de38e8 # <- this is your unique <cluster_id>

# on each of your nodes, start the swarm agent
#  <node_ip> doesn't have to be public (eg. 192.168.0.X),
#  as long as the swarm manager can access it.
$ docker run -d swarm join --addr=<node_ip:2375> token://<cluster_id>

# start the manager on any machine or your laptop
$ docker run -t -p <swarm_port>:2375 -t swarm manage token://<cluster_id>

# use the regular docker cli
$ docker -H tcp://<swarm_ip:swarm_port> info
$ docker -H tcp://<swarm_ip:swarm_port> run ...
$ docker -H tcp://<swarm_ip:swarm_port> ps
$ docker -H tcp://<swarm_ip:swarm_port> logs ...
...

# list nodes in your cluster
$ docker run --rm swarm list token://<cluster_id>
<node_ip:2375>

See here for more information about other discovery services.

Advanced Scheduling

See filters and strategies to learn more about advanced scheduling.

TLS

Swarm supports TLS authentication between the CLI and Swarm but also between Swarm and the Docker nodes.

In order to enable TLS, the same command line options as Docker can be specified:

swarm manage --tlsverify --tlscacert=<CACERT> --tlscert=<CERT> --tlskey=<KEY> [...]

Please refer to the Docker documentation for more information on how to set up TLS authentication on Docker and generating the certificates.

Note that Swarm certificates must be generated with extendedKeyUsage = clientAuth,serverAuth.

License

View license information for the software contained in this image.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository's swarm/ directory.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

Why Docker
OverviewWhat is a Container
Products
Product Overview
Product Offerings
Docker DesktopDocker Hub
Features
Container RuntimeDeveloper ToolsDocker AppKubernetes
Developers
Getting StartedPlay with DockerCommunityOpen SourceDocsHub Release Notes
Company
About UsResourcesBlogCustomersPartnersNewsroomEvents and WebinarsCareersContact Us
© 2020 Docker Inc. All rights reserved | Terms of Service | Privacy | Legal