liveBook · Manning

Docker Swarm service

As explained in Road to Kubernetes

A Docker Swarm service is a declarative definition of tasks to run on manager or worker nodes.

A Docker Swarm service is a declarative definition of a task—typically a running container—to execute on manager or worker nodes. section 9.1

Place the service within Docker Swarm’s deployment model:

  • A manager node schedules tasks and manages the cluster. section 9.1
  • A worker node runs the tasks assigned by a manager and cannot operate without one. section 9.1
  • A stack groups services and is defined in a Docker Compose file. section 9.1

From Compose to Swarm

A Docker Compose configuration normally runs a container service on one host; Docker Swarm uses almost the same, legacy Compose configuration to run services across multiple virtual machines for production deployment. section 9.1

How Road to Kubernetes covers it

How deep it goes
Defines services, tasks, nodes, and stacks, but stops short of configuration commands or service implementation details.
Examples
Uses a Docker Compose configuration, a container image, virtual machines, and a multi-node Swarm deployment as examples.
What you can do after
Evaluate/understand how a Compose-defined container service maps onto Swarm tasks, nodes, and stacks.
How it connects
Connects Docker Compose, tasks, stacks, manager nodes, worker nodes, and Kubernetes control-plane and node concepts.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Road to Kubernetes. The section links point to the parts of the book it draws on.