Summary:
In this article we will learn steps by step process to install Docker EE (Enterprise Edition) on Windows Server 2016/2019 server
Prerequisites:
Windows Server 2016, build 1607 and above, Windows Server 2019 virtual machine or physical server
Step by Step process
1. Install Container feature from Server Manage
Install Container Feature from Add and Remover (Server Manager)
2. Install Docker
[Net.ServicePointManager]::SecurityProtocol = "tls12, tls11, tls"
Install-Module Dockermsftprovider -Force
install-package docker -ProviderName DockerMsftProvider -Force
Name Version Source Summary
—- ——- —— ——-
Docker 19.03.5 DockerDefault Contains Docker EE for use with Windows Server.
3. Run following command to check Docker version
docker --version
Docker version 19.03.5, build 2ee0c57608
4. Start Docker Service
net start docker
5. Pull Container Image ServerCore-IIS
docker pull mcr.microsoft.com/windows/servercore/iis
docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
microsoft/iis servercore d4d34a16ef9d 15 months ago 1.29GB
6. Create Container with IIS image
docker run -it -d -p 8000:80 --name=<<Container_ Name>>microsoft/iis:<<Tag>>
Example:
docker run -it -d -p 8000:80 --name=web1 microsoft/iis:servercore
7. To check running Container
docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b878e0ca55a1 microsoft/iis:servercore “C:\\ServiceMonitor.e…” 34 seconds ago Up 12 seconds 80/tcp, 0.0.0.0:8000->8000/tcp web1
Additional Steps:
- To inspect Container Configuration:
docker inspect web1
2. To enter into the Container
docker exec -it <<Container_ Name>> cmd
Example:
docker exec -it web1 cmd
Run Exit command to get out off container
3. To stop and Start Container, use following commands:
Docker container start <Container_name>
Example:
Docker container start web1
Docker stop <Container_Name>
Example:
Docker stop web1
Resource:
Windows container version compatibility