Deploy and Manage an App on Swarm

Learn how to deploy and manage a web service using Docker Swarm.

We'll cover the following

Swarm nodes can run regular containers, but they can also run enhanced containers called services. Each service takes a single container definition and augments it with cloud-native features such as self-healing, scaling, and automated rollouts and rollbacks.

In this lesson, we'll deploy a simple web server as a swarm service and see how to scale it, perform rollouts, and delete it.

Creating services

Swarm lets you create and manage services in two ways:

  1. Imperatively on the command line

  2. Declaratively with a Compose file

We’ll look at Compose files in the next chapter. For now, we’ll focus on the imperative method.

Run the following command to deploy a new service called web-fe with five identical replicas.

Get hands-on with 1400+ tech skills courses.