- Launch PowerShell as an administrator and run the following command:
Install-WindowsFeature -Name Containers
Restart-Computer -Force - The server will reboot
- After logging back in, relaunch PowerShell and continue with the following commands:
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
# Press Y to install the NuGet provider
Install-Package -Name docker -ProviderName DockerMsftProvider -Force
Start-Service docker
docker image pull mcr.microsoft.com/dotnet/core/aspnet:3.0
docker image pull mcr.microsoft.com/dotnet/core/sdk:3.0.100
docker container run -d -p 8080:80 sixeyed/whoami-dotnet:3.0 - Open a web browser and navigate to http://localhost:8080
- To run another example container, execute the following in PowerShell
docker run hello-world
- Docker will download the hello-world container and execute it, displaying following output:
Hello from Docker!
This message shows that your installation appears to be working correctly.To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.