1.管理员运行命令行
invoke-webrequest -UseBasicparsing -Outfile docker.zip https://download.docker.com/components/engine/windows-server/19.03/docker-19-03-11.zip
2.解压缩包
Expand-Archive docker.zip -DestinationPath $Env:ProgramFiles
3.删除docker.zip
Remove-Item -Force docker.zip
4.安装服务
$null = Install-WindowsFeature containers
5.添加当前环境变量
$env:path += "$env:ProgramFiles\docker"
6.添加全局环境变量
ps> $newPath = "$env:ProgramFiles\docker;" +
[Environment]::GetEnvironmentVariable("PATH",
[EnvironmentVariableTarget]::Machine)
ps> [Environment]::SetEnvironmentVariable("PATH", $newPath,
[EnvironmentVariableTarget]::Machine)
7.注册服务
dockerd --register-service
8.启动服务
Start-Service docker
{
"registry-mirrors":[],
"insecure-registries":["xxx.mingyuanyun.com:5000"],
"debug":true,
"shutdown-timeout":60,
"experimental": true,
"graph": "F:\\ProgramData\\Docker",
"hosts": ["tcp://0.0.0.0:2376", "npipe://"]
}
网友评论