Access Docker Host Remotely
Blog Containers

Access Docker Host Remotely

Access Docker Host Remotely

In this blog, we will share you how to access docker host remotely using docker client.



  • Nano Server with Docker Installed
  • Client Machine to access the docker host through PowerShell




The docker engine is powered by dockerd in both windows and Linux. Dockerd is for Docker Daemon. This service has an ability to interface with docker client. It has lots of start-up options to customize the docker client service. We can configure the start-up option manually or we can setup in a configuration file. To configure the remote access to docker host, we need to specify the IP and port number using the customize options.


For more information about the dockerd, please check this URL: https://docs.docker.com/engine/reference/commandline/dockerd/#windows-configuration-file



  • We need to open a port a firewall on nano server (docker host). Execute the below command to open port 2375

netsh advfirewall firewall add rule name=”Docker Daemon” dir=in action=allow protocol=TCP localport=2375

Access Docker host Remotely



  • Create a blank file named daemon.json under c:\programdata\docker\config folder using below command.

New-Item -Itemtype file c:\ProgramData\docker\config\daemon.json

Access Docker host Remotely


  • Add the host key into the file using the below command.

Add-Content ‘c:\ProgramData\docker\config\daemon.json’ ‘{ “hosts”: [“tcp://”, “npipe://”] }’

Access Docker host Remotely

  • To list the content from a file, use the below command.

Get-Content ‘C:\ProgramData\docker\config\daemon.json’

Access Docker host Remotely


  • Restart the Docker service using below command.

Restart-service docker

Access Docker host Remotely



  • Execute the bunch of PowerShell scripts given below.

$package = “https://download.docker.com/components/engine/windows-server/cs-1.12/docker.zip”

Invoke-WebRequest $package -OutFile “$env:TEMP\docker.zip” -UseBasicParsing

Expand-Archive -Path “$env:TEMP\docker.zip” -DestinationPath $env:ProgramFiles

[Environment]::SetEnvironmentVariable(“path”,$env:Path + “;$($env:ProgramFiles)\Docker”, [EnvironmentVariableTarget]::Machine)


Above scripts will download the docker.zip and extract the files under program files folder. Also, it adds the environment variable for Docker folder.

Access Docker host Remotely

  • Now Docker folder will be available in C:\Program Files folder.

Access Docker host Remotely

  • Environment variable will also available for docker.

Access Docker host Remotely



  • Go to PowerShell and execute the below command to access the docker host remotely.

docker -H tcp:// version

The IP belongs to nano server docker host. The version is a command to execute on the remote docker host server.


Access Docker host Remotely



Thanks for visiting this blog. We hope this blog is useful for you to learn how to access the docker host remotely through PowerShell.

One thought on “Access Docker Host Remotely”

  1. Hello Loges,

    I trying to access the docker host on my Windows 10 Pro desktop ( from my laptop.

    The daemon.json config file already had the below lines
    “registry-mirrors”: [],
    “insecure-registries”: [],
    “debug”: true,
    “experimental”: false

    After running the below from your blog, the daemon failed to restart:

    Add-Content ‘c:\ProgramData\docker\config\daemon.json’ ‘{ “hosts”: [“tcp://”, “npipe://”] }’

    I had to undo the change inorder for it to come backup.

    What am I missing?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.