Can docker Desktop connect to remote host? Yes. Follow through this guide to learn how to connect to Remote Docker environment on Docker Desktop. Docker desktop is a GUI based application that enables developers to easily create environments for building their applications. It can be used to connect to local or remote Docker engines for the management docker containers.
Table of Contents
Connecting to Remote Docker using Docker Desktop
Install Docker Desktop
Of course you need to have Docker desktop installed for you to proceed.
How to Install Docker Desktop on Kali Linux
How to Install Docker Desktop on Ubuntu 22.04/Ubuntu 20.04
Install Portainer Extension on Docker Desktop
Next, install Portainer extension on Docker desktop to allow you connect to remote Docker daemon.
Install Portainer Extension on Docker Desktop
Setup Remote Access to Docker Daemon
Docker daemon allows connection form the localhost only. In order for you to remotely access your remote Docker daemon from Docker desktop, you need to enable remote access on the remote Docker engine.
The guide in the link below elaborates how you can setup Docker daemon for remote access.
Configure Docker Daemon for Remote Connections
Connecting to Remote Docker on Docker Desktop
Once all that is done, launch the Docker desktop app and open the Portainer extension;
Add remote Docker environment into Portainer
You local environment might already be added to the Portainer extension as you can see from the screenshot above.
To add your remote Docker environment;
- Click Environments on the Portainer;
- +Add environment.
- Select your specific Docker environment from the available options. In this setup, we will connect to our remote Docker standalone environment.
- Click Start Wizard at the bottom to start configuration of the remote Docker connection;
Connect to your Docker Standalone environment
There are three different ways in which you can connect to your remote Docker environment from the Portainer;
- via Portainer agent (you need to install portainer on your remote Docker environment)
- via Docker API (See above on how to configure secured access)
- via Socket
We will be using the Docker API method of connection in this guide. For a secure connection, you need to enable HTTPS. See how to connect to Docker Daemon using via TLS (HTTPS)
When that is done, from the Docker desktop environment setup wizard;
- Select API
- Enter the descriptive name of the environment
- Define the API address, IP/domain and port. Port is usually 2376 for TLS and 2375 for non-TLS.
- If you setup your environment to use TLS, enable TLS.
- And upload the CA, cert and key files.
- Click Connect.
You environment should now be added.
You can also see that it is connected from the Home tab;
Docker environment dashboard.
See remote Docker environment container list.
Remote Container controls;
And that is how easy it is to use Docker desktop to connect to remote Docker environment.
See how convenient it is to use Docker desktop?
Other Tutorials
How to Install Docker Resource Usage Extension
Uncomment Lines in a File using SED in Linux