From the course: Docker for Developers
Unlock the full course today
Join today to access over 24,700 courses taught by industry experts.
Adding nodes to the swarm - Docker Tutorial
From the course: Docker for Developers
Adding nodes to the swarm
- [Instructor] Okay, so now we have a swarm created, so you can add a node to the swarm if you want. When using the approach we just did, which is a single node swarm, you can deploy a stack to your swarm by leveraging the composed command. So let's say for example, we wanted to add workers to the swarm we just created, you could literally go into the actual directory where you have a Docker compose file like this, and then basically add all these services to your swarm. So we could go in here, and let's make sure we're in the right directory, we are, so we can see the Docker compose file. So you would do something like this command. So Docker, stack, deploy, and then the actual Yammel file. So Docker, compose .yml, like so, and then name your stack. And this would create a stack for you. So if you have access to multiple machines, physical or virtual, you can add nodes to the swarm, leveraging the command that was…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.