美文网首页
windows server 离线安装docker

windows server 离线安装docker

作者: shangyaqi | 来源:发表于2019-04-01 17:20 被阅读0次
  1. 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

  2. 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:path += ";env:ProgramFiles\docker"

Optionally, modify PATH to persist across sessions.

newPath = "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

相关文章

网友评论

      本文标题:windows server 离线安装docker

      本文链接:https://www.haomeiwen.com/subject/akxbbqtx.html