diff --git a/docker-cloud/cloud-swarm/connect-to-swarm.md b/docker-cloud/cloud-swarm/connect-to-swarm.md index 04ed92aa05..23057311f6 100644 --- a/docker-cloud/cloud-swarm/connect-to-swarm.md +++ b/docker-cloud/cloud-swarm/connect-to-swarm.md @@ -99,6 +99,48 @@ To switch back to the deployed swarm, re-run the `export DOCKER_HOST` command wi To learn more, see [Unset environment variables in the current shell](/machine/get-started/#unset-environment-variables-in-the-current-shell). +## Use Docker for Mac and Windows (Edge) to connect to swarms + +On Docker for Mac and Docker for Windows current Edge releases, +you can access your Docker Cloud account and connect directly to your swarms through those Docker desktop application menus. + +* See [Docker Cloud (Edge feature) in Docker for Mac topics](/docker-for-mac/#docker-cloud-edge-feature) + +* See [Docker Cloud (Edge feature) in Docker for Windows topics](/docker-for-windows/#docker-cloud-edge-feature) + +> **Tip**: This is different from using Docker for Mac or Windows with +Docker Machine as described in previous examples. Here, we are +by-passing Docker Machine, and using the desktop Moby VM directly, so +there is no need to manually set shell environment variables. + +This works the same way on both Docker for Mac and Docker for Windows. + +Here is an example, showing the Docker for Mac UI. + +1. Make sure you are logged in to your Docker Cloud account on the desktop app. + + ![Docker for Mac Cloud login](images/d4mac-cloud-login.png) + +2. Choose the swarm you want from the menu. + + ![Docker for Mac Cloud login](images/d4mac-swarm-connect.png) + +3. A new terminal window opens and connects to the swarm you chose. The swarm name is shown at the prompt. For this example, we connected to `vote-swarm`. + + ```shell + [vote-swarm] ~ + ``` + +4. Now, you can run `docker node ls` to verify that the swarm is running. + + ```shell + [vote-swarm] ~ $ docker node ls + ID HOSTNAME STATUS AVAILABILITY MANAGER STATUS + 7ex8inrg8xzgonaunwp35zxfl ip-172-31-6-204.us-west-1.compute.internal Ready Active + ec3kxibdxqhgw5aele7x853er * ip-172-31-0-178.us-west-1.compute.internal Ready Active Leader + z4ngrierv27wdm6oy0z3t9r1z ip-172-31-31-240.us-west-1.compute.internal Ready Active + ``` + ## Reconnect a swarm If you accidentally unregister a swarm from Docker Cloud, or decide that you diff --git a/docker-cloud/cloud-swarm/images/d4mac-cloud-login.png b/docker-cloud/cloud-swarm/images/d4mac-cloud-login.png new file mode 100644 index 0000000000..911d86435b Binary files /dev/null and b/docker-cloud/cloud-swarm/images/d4mac-cloud-login.png differ diff --git a/docker-cloud/cloud-swarm/images/d4mac-swarm-connect.png b/docker-cloud/cloud-swarm/images/d4mac-swarm-connect.png new file mode 100644 index 0000000000..b8241b075d Binary files /dev/null and b/docker-cloud/cloud-swarm/images/d4mac-swarm-connect.png differ diff --git a/docker-cloud/cloud-swarm/images/d4win-swarm-connect.png b/docker-cloud/cloud-swarm/images/d4win-swarm-connect.png new file mode 100644 index 0000000000..323f7a5f5c Binary files /dev/null and b/docker-cloud/cloud-swarm/images/d4win-swarm-connect.png differ diff --git a/docker-cloud/cloud-swarm/images/d4win-swarm-connected-shell.png b/docker-cloud/cloud-swarm/images/d4win-swarm-connected-shell.png new file mode 100644 index 0000000000..154ba80e0e Binary files /dev/null and b/docker-cloud/cloud-swarm/images/d4win-swarm-connected-shell.png differ