Connect to a swarm through Docker CloudEstimated reading time: 1 minute
Docker Cloud allows you to connect your local Docker Engine to any swarm you have access to in Docker Cloud. To do this, you run a proxy container in your local Docker instance, which connects to a manager node on the target swarm.
Connect to a swarm
- Log in to Docker Cloud in your web browser.
- Click Swarms in the top navigation, and click the name of the swarm you want to connect to.
- Copy the command provided in the dialog that appears.
In a terminal window connected to your local Docker Engine, paste the command, and press Enter.
The local Docker Engine downloads a containerized Docker Cloud client tool, and connects to the swarm.
To complete the connection process, run the
export DOCKER_HOSTcommand found in the previous command’s output, to connect your local shell to the client proxy.
Be sure to include the client connection port in the URL. For example
To switch Docker hosts you can either run the
export command again to overwrite it, or use
Note: If you are using Docker Machine, be sure to unset
DOCKER_TLS_VERIFYas described in the known issues.
Reconnect a swarm
If you accidentally unregister a swarm from Docker Cloud, or decide that you want to re-register the swarm after it has been removed, you can re-register it using the same process as a normal registration. If the swarm is registered to an organization, its access permissions were deleted when it was unregistered, and must be recreated.
Note: You cannot register a new or different swarm under the name of a swarm that was unregistered. To re-register a swarm, it must have the same swarm ID as it did when previously registered.
Where to go next
Learn how to create a new swarm in Docker Cloud.swarm mode, swarms, orchestration Cloud, fleet management