Connect to Remote Docker Environment on Docker Desktop

|
Last Updated:
|
|

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.

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;

Connect to Remote Docker Environment on Docker Desktop

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 Remote Docker Environment on Docker Desktop

Connect to your Docker Standalone environment

There are three different ways in which you can connect to your remote Docker environment from the Portainer;

  1. via Portainer agent (you need to install portainer on your remote Docker environment)
  2. via Docker API (See above on how to configure secured access)
  3. 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.
Connect to Remote Docker Environment on Docker Desktop
  • Click Connect.

You environment should now be added.

docker environment added

You can also see that it is connected from the Home tab;

Connect to Remote Docker Environment on Docker Desktop

Docker environment dashboard.

Connect to Remote Docker Environment on Docker Desktop

See remote Docker environment container list.

Connect to Remote Docker Environment on Docker Desktop

Remote Container controls;

Connect to Remote Docker Environment on Docker Desktop

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

Monitor Docker Containers Metrics using Grafana

How to Monitor Docker Containers using Nagios

SUPPORT US VIA A VIRTUAL CUP OF COFFEE

We're passionate about sharing our knowledge and experiences with you through our blog. If you appreciate our efforts, consider buying us a virtual coffee. Your support keeps us motivated and enables us to continually improve, ensuring that we can provide you with the best content possible. Thank you for being a coffee-fueled champion of our work!

Photo of author
Kifarunix
Linux Certified Engineer, with a passion for open-source technology and a strong understanding of Linux systems. With experience in system administration, troubleshooting, and automation, I am skilled in maintaining and optimizing Linux infrastructure.

Leave a Comment