Skip to content

Remote Windows Docker Desktop

Javier Romero edited this page Apr 9, 2022 · 2 revisions

Prerequisites

Install

Setup

On the remote Windows machine:

  1. In Docker, SettingsGeneral:
    • Check Expose daemon on tcp://localhost:2375 without TLS
    • Click Apply & Restart

Using ssh

Prerequisites

  • local machine has an installed SSH key
    ssh-add -l

Configure

On the remote Windows machine, in Administrator PowerShell:

  1. Enable SSH:
    Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 ; Get-Service sshd | Set-Service -StartupType Automatic
    
  2. Start SSH Service:
    Start-Service sshd
    

On local machine, in terminal:

  1. Install local key on remote host:
    ssh-copy-id <user>@<windows-host>
    
  2. Test connection:
    docker -H ssh://<user>@<windows-host> info
    
  3. Set DOCKER_HOST:
    export DOCKER_HOST=ssh://<user>@<windows-host>
    
  4. Retest connection:
    docker info
    

Using ngrok

Prerequisite

Tunnel

On the remote Windows machine:

  1. In PowerShell,
    • ngrok tcp 2375
Clone this wiki locally