Hands-On Kubernetes on Windows
上QQ阅读APP看书,第一时间看更新

Verifying the installation

Now, let's verify whether the installation was successful:

  1. Confirm that the Docker Client is working properly by opening Powershell and executing the following command:
docker version
  1. You should see an output similar to the following:
Client: Docker Engine - Community
Version: 18.09.2
API version: 1.39
Go version: go1.10.8
Git commit: 6247962
Built: Sun Feb 10 04:12:31 2019
OS/Arch: windows/amd64
Experimental: false

Server: Docker Engine - Community
Engine:
Version: 18.09.2
API version: 1.39 (minimum version 1.12)
Go version: go1.10.6
Git commit: 6247962
Built: Sun Feb 10 04:13:06 2019
OS/Arch: linux/amd64
Experimental: false
  1. Run a simple container based on the official Powershell image:
docker run -it --rm mcr.microsoft.com/powershell pwsh -c 'Write-Host "Hello, World!"'

  1. During the first run of this command, the missing container image layers will be downloaded. After some time, you will see Hello, World! written to the console output by Powershell:

  1. Congratulations! You have successfully installed Docker Desktop for Windows and run your first container.

In the next subsection, you will learn how to enable process isolation for containers.