Docker Enterprise Edition for Windows Server 2016(Docker EE)在Windows Server 2016上启用本机Docker容器。Docker EE安装包包括在Windows Server 2016上运行Docker所需的所有内容。本主题介绍了预安装注意事项,以及如何下载和安装Docker EE
## 安装Docker EE
Docker EE for Windows需要Windows Server 2016。要在Windows 10机器上安装Docker Community Edition(Docker CE)。
1. 打开PowerShell命令提示符,然后键入以下命令。
~~~
PS> Install-Module -Name DockerMsftProvider -Force
PS> Install-Package -Name docker -ProviderName DockerMsftProvider -Force
PS> Restart-Computer -Force
~~~
2. 通过运行`hello-world`容器测试Docker EE 安装。
~~~
PS> docker run hello-world:nanoserver
Unable to find image 'hello-world:nanoserver' locally
nanoserver: Pulling from library/hello-world
bce2fbc256ea: Pull complete
3ac17e2e6106: Pull complete
8cac44e17f16: Pull complete
5e160e4d8db3: Pull complete
Digest: sha256:25eac12ba40f7591969085ab3fb9772e8a4307553c14ea72d0e6f98b2c8ced9d
Status: Downloaded newer image for hello-world:nanoserver
Hello from Docker!
This message shows that your installation appears to be working correctly.
<snip>
~~~
## 使用脚本来安装Docker EE
当您要手动安装脚本自动安装或安装在空中密码系统上时,请使用以下步骤。
1. 在PowerShell命令提示符下,在具有连接的计算机上下载安装程序归档。
~~~
# On an online machine, download the zip file.
PS> invoke-webrequest -UseBasicparsing -Outfile docker.zip https://download.docker.com/components/engine/windows-server/17.03/docker-17.03.0-ee.zip
~~~
2. 将zip文件复制到要安装Docker的机器上。在PowerShell命令提示符下,使用以下命令提取归档,注册和启动Docker服务。
~~~
# Extract the archive.
PS> Expand-Archive docker.zip -DestinationPath $Env:ProgramFiles
# Clean up the zip file.
PS> Remove-Item -Force docker.zip
# Install Docker. This will require rebooting.
$null = Install-WindowsFeature containers
# Add Docker to the path for the current session.
PS> $env:path += "$env:ProgramFiles\docker"
# Optionally, modify PATH to persist across sessions.
PS> $newPath = "$env:ProgramFiles\docker;" +
[Environment]::GetEnvironmentVariable("PATH",
[EnvironmentVariableTarget]::Machine)
PS> [Environment]::SetEnvironmentVariable("PATH", $newPath,
[EnvironmentVariableTarget]::Machine)
# Register the Docker daemon as a service.
PS> dockerd --register-service
# Start the daemon.
PS> Start-Service docker
~~~
3. 通过运行`hello-world`容器测试Docker EE 安装。
~~~
PS> docker run hello-world:nanoserver
~~~
###安装前要知道什么
* Docker EE for Windows安装包括:安装提供了Docker Engine和 Docker CLI客户端。