Windows 2022
Sponsored Link

Docker : Install2022/01/21

 
Install Docker that is the Operating System-Level Virtualization Tool, that automates the deployment of applications inside Containers.
[1] Run PowerShell with Admin Privilege and Install Docker.
Windows PowerShell
Copyright (C) Microsoft Corporation. All rights reserved.

# install [Containers] feature
# restart after inputting [Y(es)]
PS C:\Users\Administrator> Enable-WindowsOptionalFeature -Online -FeatureName Containers 
Do you want to restart the computer to complete this operation now?
[Y] Yes  [N] No  [?] Help (default is "Y"): Y

# after restarting, install Docker
PS C:\Users\Administrator> Install-Module -Name DockerMsftProvider -Repository PSGallery -Force 

NuGet provider is required to continue
PowerShellGet requires NuGet provider version '2.8.5.201' or newer to interact with NuGet-based repositories. The NuGet
provider must be available in 'C:\Program Files\PackageManagement\ProviderAssemblies' or
'C:\Users\Administrator\AppData\Local\PackageManagement\ProviderAssemblies'. You can also install the NuGet provider by running
 'Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force'. Do you want PowerShellGet to install and import the
NuGet provider now?
[Y] Yes  [N] No  [S] Suspend  [?] Help (default is "Y"): Y

PS C:\Users\Administrator> Install-Package -Name docker -ProviderName DockerMsftProvider 

The package(s) come(s) from a package source that is not marked as trusted.
Are you sure you want to install software from 'DockerDefault'?
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help (default is "N"): Y

Name                           Version          Source           Summary
----                           -------          ------           -------
Docker                         20.10.7          DockerDefault    Contains Docker EE for use with Windows Server.

# restart again
PS C:\Users\Administrator> Restart-Computer -Force 

# verify status
PS C:\Users\Administrator> docker version 
Client: Mirantis Container Runtime
 Version:           20.10.7
 API version:       1.41
 Go version:        go1.13.15
 Git commit:        40ef3b6
 Built:             08/19/2021 18:54:26
 OS/Arch:           windows/amd64
 Context:           default
 Experimental:      true

Server: Mirantis Container Runtime
 Engine:
  Version:          20.10.7
  API version:      1.41 (minimum version 1.24)
  Go version:       go1.13.15
  Git commit:       e1bf5b9c13
  Built:            08/19/2021 18:53:20
  OS/Arch:          windows/amd64
  Experimental:     false
Docker : Install (GUI)
 
On GUI installation, set like follows.
[2] Run Server Manager and start [Add roles and features], then select [Containers] feature on [Select features] section like follows to install. After installing, restart computer.
[3]
After restarting, Run PowerShell with Admin Privilege and Install Docker.
Answer Y (Yes) to all confirmations during the installation.
PS > Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
PS > Install-Package -Name docker -ProviderName DockerMsftProvider
[4] After installing, [Docker Engine] service will be added like follows. Restart computer again.
[5]
After restarting, Run PowerShell with Admin Privilege and run docker command to verify status.
PS > docker version
Matched Content