assistanz
Assistanz

Access Docker Host Remotely

Access Docker Host Remotely

Access Docker Host Remotely

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

 

REQUIREMENTS

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

 

DOCKER ENGINE OVERVIEW

 

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

 

CONFIGURING FIREWALL

  • 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

 

CREATING DAEMON FILE

  • 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://0.0.0.0:2375", "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

 

INSTALLING DOCKER ENGINE IN CLIENT MACHINE

  • 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

 

ACCESS DOCKER HOST REMOTELY

  • Go to PowerShell and execute the below command to access the docker host remotely.
docker -H tcp://192.168.232.81:2375 version


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

 

Access Docker host Remotely

VIDEO

 

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

DirectAdmin Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk
$ 99 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • NDA & SLA
  • SLA Review Meetings
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation
  •  

Platinum Support

24/7 Proactive Support
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Support

$ 30 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response Time
  • 4 Hours Resolution time for the Possible Issues
  • Security and Performance Optimization
  • React to Customers queries
  • Simple SignUp Process
  • Instant Account Activation
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support

Cpanel Server Management Plans

Premium Support

24/7 End User Support from your Helpdesk

$ 99 Monthly / Server
  • 24/7 End User White Label Support
  • Unlimited Number of Tickets
  • Chat Support for Admin
  • Separate Account Manager
  • Guaranteed SLA
  • Weekly Status Reports
  • FREE Consultancy Services
  • Simple SignUp Process
  • Instant Account Activation

Platinum Support

24/7 Proactive Server Management
$ 49 Monthly / Server
  • Unlimited Support Plan
  • 24/7 Emergency Phone
  • Chat Support for Admin
  • Separate Account Manager
  • Advance Proactive Monitoring
  • Guaranteed SLA
  • SLA Review Meetings
  • 3rd Party Application Support
  • FREE Consultancy Services
  • Server Migration Support
  • Weekly Status Report
  • No End User Support
Popular

Unlimited Support

24/7 Server Management

$ 29 Monthly / Server
  • Unlimited Admin Tasks
  • 24/7 Support
  • Basic Monitoring
  • 30 Minutes Response time
  • 4 hours Response time for possible issues
  • Security and Performance Optimization
  • React to Customers queries
  • No Third party application support
  • No Migration and End User Support