Creating a Docker Swarm in the cloud

All of the Docker Swarms we have created so far are wonderful to use in development or to experiment or to use for demonstration purposes. If we want to create a Swarm that can be used as a production environment where we run our mission-critical applications, though, then we need to create a—I'm tempted to sayreal Swarm in the cloud or on premises. In this book, we are going to demonstrate how to create a Docker Swarm in AWS.

One way to create a Swarm is by using docker-machine (DM). DM has a driver for AWS. If we have an account on AWS, we need the AWS access key ID and the AWS secret access key. We can add those two values to a file called ~/.aws/configuration. It should look like the following:

Get Learn Docker - Fundamentals of Docker 19.x - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.