-
download docker.zip
Invoke-WebRequest -UseBasicParsing -OutFile docker-19.03.3.zip https://download.docker.com/components/engine/windows-server/19.03/docker-19.03.3.zip -
install docker on windows server
Stop Docker service
Stop-Service docker
Extract the archive.
Expand-Archive docker-19.03.3.zip -DestinationPath $Env:ProgramFiles -Force
Clean up the zip file.
Remove-Item -Force docker-19.03.3.zip
Install Docker. This requires rebooting.
$null = Install-WindowsFeature containers
Add Docker to the path for the current session.
env:ProgramFiles\docker"
Optionally, modify PATH to persist across sessions.
env:ProgramFiles\docker;" +
[Environment]::GetEnvironmentVariable("PATH",
[EnvironmentVariableTarget]::Machine)
[Environment]::SetEnvironmentVariable("PATH", $newPath,
[EnvironmentVariableTarget]::Machine)
Register the Docker daemon as a service.
dockerd --register-service
Start the Docker service.
Start-Service docker
网友评论