{"id":15584,"date":"2023-03-02T22:08:38","date_gmt":"2023-03-02T19:08:38","guid":{"rendered":"https:\/\/kifarunix.com\/?p=15584"},"modified":"2024-03-10T08:40:38","modified_gmt":"2024-03-10T05:40:38","slug":"connect-to-remote-docker-environment-on-docker-desktop","status":"publish","type":"post","link":"https:\/\/kifarunix.com\/connect-to-remote-docker-environment-on-docker-desktop\/","title":{"rendered":"Connect to Remote Docker Environment on Docker Desktop"},"content":{"rendered":"\n<p>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.<\/p>\n\n\n\n<div class=\"wp-block-rank-math-toc-block\" id=\"rank-math-toc\"><h2>Table of Contents<\/h2><nav><ul><li><a href=\"#connecting-to-remote-docker-using-docker-desktop\">Connecting to Remote Docker using Docker Desktop<\/a><ul><li><a href=\"#install-docker-desktop\">Install Docker Desktop<\/a><\/li><li><a href=\"#install-portainer-extension-on-docker-desktop\">Install Portainer Extension on Docker Desktop<\/a><\/li><li><a href=\"#setup-remote-access-to-docker-daemon\">Setup Remote Access to Docker Daemon<\/a><\/li><li><a href=\"#connecting-to-remote-docker-on-docker-desktop\">Connecting to Remote Docker on Docker Desktop<\/a><ul><li><a href=\"#add-remote-docker-environment-into-portainer\">Add remote Docker environment into Portainer<\/a><\/li><li><a href=\"#connect-to-your-docker-standalone-environment\">Connect to your remote Docker Environment<\/a><\/li><\/ul><\/li><\/ul><\/li><\/ul><\/nav><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"connecting-to-remote-docker-using-docker-desktop\">Connecting to Remote Docker using Docker Desktop<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-docker-desktop\">Install Docker Desktop<\/h3>\n\n\n\n<p>Of course you need to have Docker desktop installed for you to proceed.<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-install-docker-desktop-on-kali-linux\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Install Docker Desktop on Kali Linux<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-install-docker-desktop-on-ubuntu\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Install Docker Desktop on Ubuntu 22.04\/Ubuntu 20.04<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"install-portainer-extension-on-docker-desktop\">Install Portainer Extension on Docker Desktop<\/h3>\n\n\n\n<p>Next, install Portainer extension on Docker desktop to allow you connect to remote Docker daemon.<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/install-portainer-extension-on-docker-desktop\/\" target=\"_blank\" rel=\"noreferrer noopener\">Install Portainer Extension on Docker Desktop<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"setup-remote-access-to-docker-daemon\"><a href=\"#setup-secure-access\">Setup Remote Access to Docker Daemon<\/a><\/h3>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>The guide in the link below elaborates how you can setup Docker daemon for remote access.<\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/configure-docker-daemon-for-remote-connections\/\" target=\"_blank\" rel=\"noreferrer noopener\">Configure Docker Daemon for Remote Connections<\/a><\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"connecting-to-remote-docker-on-docker-desktop\">Connecting to Remote Docker on Docker Desktop<\/h3>\n\n\n\n<p>Once all that is done, launch the Docker desktop app and open the Portainer extension;<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/portainer-extension.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1833\" height=\"553\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/portainer-extension.png\" alt=\"Connect to Remote Docker Environment on Docker Desktop\" class=\"wp-image-15598\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/portainer-extension.png?v=1677782870 1833w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/portainer-extension-768x232.png?v=1677782870 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/portainer-extension-1536x463.png?v=1677782870 1536w\" sizes=\"(max-width: 1833px) 100vw, 1833px\" \/><\/figure><\/a><\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"add-remote-docker-environment-into-portainer\">Add remote Docker environment into Portainer<\/h4>\n\n\n\n<p>You local environment might already be added to the Portainer extension as you can see from the screenshot above.<\/p>\n\n\n\n<p>To add your remote Docker environment;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click <strong>Environments<\/strong> on the Portainer;<\/li>\n\n\n\n<li><strong>+Add environment<\/strong>.<\/li>\n\n\n\n<li>Select your specific Docker environment from the available options. In this setup, we will connect to our remote Docker standalone environment.<\/li>\n\n\n\n<li>Click <strong>Start<\/strong> <strong>Wizard<\/strong> at the bottom to start configuration of the remote Docker connection;<\/li>\n<\/ul>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environments.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1452\" height=\"812\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environments.png\" alt=\"Connect to Remote Docker Environment on Docker Desktop\" class=\"wp-image-15599\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environments.png?v=1677783264 1452w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environments-768x429.png?v=1677783264 768w\" sizes=\"(max-width: 1452px) 100vw, 1452px\" \/><\/figure><\/a><\/div>\n\n\n\n<h4 class=\"wp-block-heading\" id=\"connect-to-your-docker-standalone-environment\">Connect to your Docker Standalone environment<\/h4>\n\n\n\n<p>There are three different ways in which you can connect to your remote Docker environment from the Portainer;<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>via Portainer agent (you need to install portainer on your remote Docker environment)<\/li>\n\n\n\n<li>via Docker API (See above on <a href=\"http:\/\/setup-secure-access\" target=\"_blank\">how to configure secured access<\/a>)<\/li>\n\n\n\n<li>via Socket<\/li>\n<\/ol>\n\n\n\n<p>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 <a href=\"https:\/\/kifarunix.com\/configure-docker-daemon-for-remote-connections\/#connect-to-docer-via-https\">connect to Docker Daemon using via TLS (HTTPS)<\/a><\/p>\n\n\n\n<p>When that is done, from the Docker desktop environment setup wizard;<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Select API<\/li>\n\n\n\n<li>Enter the descriptive name of the environment<\/li>\n\n\n\n<li>Define the API address, IP\/domain and port. Port is usually 2376 for TLS and 2375 for non-TLS.<\/li>\n\n\n\n<li>If you setup your environment to use TLS, enable TLS.<\/li>\n\n\n\n<li>And upload the CA, cert and key files.<\/li>\n<\/ul>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-api-connection-settings.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1813\" height=\"920\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-api-connection-settings.png\" alt=\"Connect to Remote Docker Environment on Docker Desktop\" class=\"wp-image-15601\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-api-connection-settings.png?v=1677783405 1813w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-api-connection-settings-768x390.png?v=1677783405 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-api-connection-settings-1536x779.png?v=1677783405 1536w\" sizes=\"(max-width: 1813px) 100vw, 1813px\" \/><\/figure><\/a><\/div>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Click <strong>Connect<\/strong>.<\/li>\n<\/ul>\n\n\n\n<p>You environment should now be added.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1831\" height=\"477\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environment-added.png\" alt=\"\" class=\"wp-image-15602\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environment-added.png?v=1677783480 1831w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environment-added-768x200.png?v=1677783480 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environment-added-1536x400.png?v=1677783480 1536w\" sizes=\"(max-width: 1831px) 100vw, 1831px\" \/><\/figure>\n\n\n\n<p>You can also see that it is connected from the <strong>Home<\/strong> tab;<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-desktop-portainer-environments.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1832\" height=\"573\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-desktop-portainer-environments.png\" alt=\"Connect to Remote Docker Environment on Docker Desktop\" class=\"wp-image-15603\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-desktop-portainer-environments.png?v=1677783498 1832w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-desktop-portainer-environments-768x240.png?v=1677783498 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-desktop-portainer-environments-1536x480.png?v=1677783498 1536w\" sizes=\"(max-width: 1832px) 100vw, 1832px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>Docker environment dashboard.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environment-details.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1831\" height=\"754\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environment-details.png\" alt=\"Connect to Remote Docker Environment on Docker Desktop\" class=\"wp-image-15604\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environment-details.png?v=1677783551 1831w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environment-details-768x316.png?v=1677783551 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environment-details-1536x633.png?v=1677783551 1536w\" sizes=\"(max-width: 1831px) 100vw, 1831px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>See remote Docker environment container list.<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environment-container-lists.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1834\" height=\"780\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environment-container-lists.png\" alt=\"Connect to Remote Docker Environment on Docker Desktop\" class=\"wp-image-15605\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environment-container-lists.png?v=1677783590 1834w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environment-container-lists-768x327.png?v=1677783590 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/docker-environment-container-lists-1536x653.png?v=1677783590 1536w\" sizes=\"(max-width: 1834px) 100vw, 1834px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>Remote Container controls;<\/p>\n\n\n\n<div><a href=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/container-control-pane.png\" class=\"td-modal-image\"><figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"1811\" height=\"921\" src=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/container-control-pane.png\" alt=\"Connect to Remote Docker Environment on Docker Desktop\" class=\"wp-image-15606\" title=\"\" srcset=\"https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/container-control-pane.png?v=1677783608 1811w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/container-control-pane-768x391.png?v=1677783608 768w, https:\/\/kifarunix.com\/wp-content\/uploads\/2023\/03\/container-control-pane-1536x781.png?v=1677783608 1536w\" sizes=\"(max-width: 1811px) 100vw, 1811px\" \/><\/figure><\/a><\/div>\n\n\n\n<p>And that is how easy it is to use Docker desktop to connect to remote Docker environment.<\/p>\n\n\n\n<p>See how convenient it is to use Docker desktop?<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"other-tutorials\">Other Tutorials<\/h3>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-install-docker-resource-usage-extension\/\" target=\"_blank\" rel=\"noreferrer noopener\">How to Install Docker Resource Usage Extension<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/monitor-docker-containers-metrics-using-grafana\/\" target=\"_blank\" rel=\"noreferrer noopener\">Monitor Docker Containers Metrics using Grafana<\/a><\/p>\n\n\n\n<p><a href=\"https:\/\/kifarunix.com\/how-to-monitor-docker-containers-using-nagios\/\">How to Monitor Docker Containers using Nagios<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>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<\/p>\n","protected":false},"author":10,"featured_media":15599,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rank_math_lock_modified_date":false,"footnotes":""},"categories":[121,1076,1077],"tags":[6412,6408,6411,6410,6409],"class_list":["post-15584","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-howtos","category-containers","category-docker","tag-can-we-connect-a-docker-client-to-a-remote-docker-daemon","tag-connect-to-remote-docker-environment-on-docker-desktop","tag-docker-desktop","tag-docker-remote-connection","tag-how-do-i-access-a-docker-container-from-outside-network","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-50","resize-featured-image"],"_links":{"self":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/15584"}],"collection":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/comments?post=15584"}],"version-history":[{"count":7,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/15584\/revisions"}],"predecessor-version":[{"id":20715,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/posts\/15584\/revisions\/20715"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media\/15599"}],"wp:attachment":[{"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/media?parent=15584"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/categories?post=15584"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kifarunix.com\/wp-json\/wp\/v2\/tags?post=15584"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}