Click here to Skip to main content
15,668,842 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I have even tried all the powershell based commands and it doesn't work

What I have tried:

I have even tried all the powershell based commands and it doesn't work
Posted
Updated 23-Feb-22 4:55am
Comments
Richard MacCutchan 23-Feb-22 10:54am    
This is not a valid question; we have no idea what you have tried, or what problems you have encountered. And the statement "it doesn't work", serves no purpose whatsoever. Please use the Improve question link above, and add complete details of what is not working.

1 solution

Follow the instructions from Microsoft: Prep Windows operating system containers | Microsoft Docs[^]

Quote:
To install Docker on Windows Server, you can use a OneGet provider PowerShell module published by Microsoft called the DockerMicrosoftProvider. This provider enables the containers feature in Windows and installs the Docker engine and client. Here's how:

Open an elevated PowerShell session and install the Docker-Microsoft PackageManagement Provider from the PowerShell Gallery.

Install-Module -Name DockerMsftProvider -Repository PSGallery -Force


If you're prompted to install the NuGet provider, type Y to install it as well.

If you get an error opening the PowerShell gallery, you may need to set the TLS version used by the PowerShell client to TLS 1.2. To do this, run the following command:

# Set the TLS version used by the PowerShell client to TLS 1.2.
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.SecurityProtocolType]::Tls12;


Use the PackageManagement PowerShell module to install the latest version of Docker.

Install-Package -Name docker -ProviderName DockerMsftProvider


When PowerShell asks you whether to trust the package source 'DockerDefault', type A to continue the installation.

After the installation completes, restart the computer.

Restart-Computer -Force


If you want to update Docker later:

Check the installed version using the following command:

Get-Package -Name Docker -ProviderName DockerMsftProvider


Find the current version using the following command:

Find-Package -Name Docker -ProviderName DockerMsftProvider


When you're ready to upgrade, run the following command:

Install-Package -Name Docker -ProviderName DockerMsftProvider -Update -Force


Finally, run the following command to start Docker:

Start-Service Docker
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900