Looking at the Docker install section, you’d do this in an elevated prompt (all same as in MS doc):
Invoke-WebRequest "https://get.docker.com/builds/Windows/x86_64/docker-1.12.0.zip" -OutFile "$env:TEMP\docker-1.12.0.zip" -UseBasicParsing
Expand-Archive -Path "$env:TEMP\docker-1.12.0.zip" -DestinationPath $env:ProgramFiles
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$env:ProgramFiles\docker\", [EnvironmentVariableTarget]::Machine)
The next line is slightly different:
& $env:ProgramFiles\docker\dockerd.exe -H npipe:////./pipe/win_engine --register-service
Or if you want to use the engine from a non-elevated prompt, you can register it like this:
& $env:ProgramFiles\docker\dockerd.exe -H npipe:////./pipe/win_engine -G <your-windows-username> --register-service
And then (same as doc):
Start-Service Docker
From then on, to use the Docker engine, you can either use -H
with every Docker command:
> docker -H npipe:////./pipe/win_engine version
Client:
Version: 1.12.1-rc1
API version: 1.24
Go version: go1.6.3
Git commit: 7889dc7
Built: Fri Aug 12 18:35:53 2016
OS/Arch: windows/amd64
Experimental: true
Server:
Version: 1.13.0-dev
API version: 1.25
Go version: go1.6.3
Git commit: 402cf23
Built: Thu Aug 4 08:44:34 2016
OS/Arch: windows/amd64
Or if you don’t want to do that, set the DOCKER_HOST
environment variable:
> $Env:DOCKER_HOST = "npipe:////./pipe/win_engine"
> docker version
Client:
Version: 1.12.1-rc1
API version: 1.24
Go version: go1.6.3
Git commit: 7889dc7
Built: Fri Aug 12 18:35:53 2016
OS/Arch: windows/amd64
Experimental: true
Server:
Version: 1.13.0-dev
API version: 1.25
Go version: go1.6.3
Git commit: 402cf23
Built: Thu Aug 4 08:44:34 2016
OS/Arch: windows/amd64