Creating Hyper-V and Windows Server Containers

The last step in this process is creating an image. As we mentioned earlier, containers can be created and started as Windows Containers or Hyper-V containers. To create containers, you need to use the docker run command, with different switches depending on the container type.

If you want to create a Windows container called IIS-Standard, based on the downloaded image, you need to run the following command:

docker run --name IIS-Standard -d -p 80:80 microsoft/iis:windowsservercore

For a Hyper-V container, you need to run a similar command, with one more switch that defines the isolation level:

docker run --name IIS-Hyper-V -d -p 80:80 --isolation=hyperv microsoft/iis:windowsservercore

If you want to check which Containers have been created and are running on the host, you need to run the docker ps command:

You now have two different types of container live on Windows Server 2016.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.172.195