Member-only story

Docker Swarm on your MAC in 5 minutes

Park Sehun
2 min readAug 19, 2023

Prerequisites:

  • MACBOOK

To test your application, you may want to have a very simple environment on your local PC, then here is the right solution to go.

1/ Install Homebrew

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

2/ Install Multipass

brew install --cask multipass

3/ Provision nodes

If Multipass is installed, you will need to establish the cluster for your docker.

multipass launch lunar --name node1
multipass launch lunar --name node2
multipass launch lunar --name node3

# lunar is the ubuntu image alias
# you can have multiple terminals to create three nodes

Now you have your own cluster.

4/ Install docker

multipass shell node1

# in node1, you will need to update apt-get first
sudo apt-get update
sudo apt-get install docker.io

Perform this in the rest of the two nodes.

Make sure your docker has been started and enabled.

sudo systemctl start docker
sudo systemctl enable docker

5/ Init docker swarm

Make node1 as a leader node.

Create an account to read the full story.

The author made this story available to Medium members only.
If you’re new to Medium, create a new account to read this story on us.

Or, continue in mobile web

Already have an account? Sign in

No responses yet

Write a response