Skip to content

Instantly share code, notes, and snippets.

@micahyoung
Last active October 12, 2020 12:16
Show Gist options
  • Save micahyoung/54831d078fce8154c1c10d56507e0764 to your computer and use it in GitHub Desktop.
Save micahyoung/54831d078fce8154c1c10d56507e0764 to your computer and use it in GitHub Desktop.
Set Docker Windows Server localhost listener with powershell
$config=@{}
if (Test-Path C:\ProgramData\docker\config\daemon.json) {
$config=(Get-Content C:\ProgramData\docker\config\daemon.json | ConvertFrom-json)
}
Add-Member -InputObject $config -NotePropertyName "hosts" -NotePropertyValue @("npipe://", "tcp://127.0.0.1:2375")
ConvertTo-json $config | Out-File -Encoding ASCII C:\ProgramData\docker\config\daemon.json
Restart-Service docker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment