Last active
October 12, 2020 12:16
-
-
Save micahyoung/54831d078fce8154c1c10d56507e0764 to your computer and use it in GitHub Desktop.
Set Docker Windows Server localhost listener with powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$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