To run the Docker Engine on Windows in Azure, AWS or GCP, the best way is to install the Docker Engine on Windows solution from the marketplace. It comes preinstalled with the Docker Engine Enterprise Powershell modules and packages and is fully configured as per the requirements to run Docker on Windows Server. Click on the links below to deploy into your environments
Once you have deployed Docker Engine Enterprise on Windows server, the first step is to RDP into the new instance once it has fully booted up. The following links explain how to connect the VM once it has finished being deployed:
Once logged in, you’re now ready to start setting up your new server as per the following sections.
Â
Test Docker Engine Windows Installation
How to Install Windows Containers on Docker Engine
Test your Docker Enterprise installation by running the hello-world Windows nano container:
Â
Open up a command prompt or Powershell session with elevated permissions (Run as administrator) and run the following command. This will pull down a Windows image for nano server:
Windows Server 2019 / 2022
docker run hello-world:nanoserver
Windows Server 2016
docker run hello-world:nanoserver-sac2016
The container starts, prints the hello message, and then exits.
Unable to find image 'hello-world:nanoserver' locally
nanoserver: Pulling from library/hello-world
bce2fbc256ea: Pull complete
3ac17e2e6106: Pull complete
8cac44e17f16: Pull complete
5e160e4d8db3: Pull complete
Digest: sha256:25eac12ba40f7591969085ab3fb9772e8a4307553c14ea72d0e6f98b2c8ced9d
Status: Downloaded newer image for hello-world:nanoserver
Hello from Docker!
This message shows that your installation appears to be working correctly.
How to Configure Docker Enterprise to Run Linux Containers
The default install of Docker Enterprise will run only Windows Containers. In order to install Linux containers, we need make the following changes:
Â
Install the Hyper-v Role
Install Docker Enterprise Edition Preview
Update the OS environment variables
Â
There are two distinct modes to run Docker containers on Windows platforms: Process isolation and Hyper-V isolation. With the Process isolation mode, the Docker containers share the OS kernel with the host platform, hence they are lightweight and identical to Linux system Docker containers.
Â
On the other hand, the running of Docker containers in the Hyper-V mode is confined to a special nominal virtual machine. This enables improved compatibility and secure kernel-level. To run Docker containers in this mode, you must first enable Hyper-V in the host operating system.
Â
The default operation mode for Docker installation on a Windows server is the operation mode (enabling Hyper-V is optional). However, it’s a prerequisite to enable the Hyper-V isolation mode if you need to run Linux containers on a Windows Server interface.
Â
Docker Enterprise Edition Preview includes a full LinuxKit system for running Docker Linux containers. We also need to update the environment variables that will allow you to switch back and forth between Windows and Linux containers. Run the below commands in PowerShell:
Any questions regarding the installation of this solution, please leave a comment below or contact us and we will assist as much as we can to help you get Docker up and running in your environment.
Disclaimer
Â
The respective trademarks mentioned in the offering are owned by the respective companies. No warrantee of any kind, express or implied, is included with this solution.
Â
Use at your risk, responsibility for damages (if any) to anyone resulting from the use of this solution rest entirely with the user
The author is not responsible for any damage that its use could cause.
Docker Enterprise (Windows Server) is available at no additional cost to all Windows Server 2019 and 2016 customers. Technical support is aligned to the Microsoft support entitlement and provided by Microsoft.
Cloud Solution Architect. Helping customers transform their business to the cloud. 20 years experience working in complex infrastructure environments and a Microsoft Certified Solutions Expert on everything Cloud.
51vote
Article Rating
Subscribe
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.
DisagreeAgree
Login and comment with
I allow to create an account
When you login first time using a Social Login button, we collect your account public profile information shared by Social Login provider, based on your privacy settings. We also get your email address to automatically create an account for you in our website. Once your account is created, you'll be logged-in to this account.
DisagreeAgree
Please login to comment
2 Comments
Most Voted
NewestOldest
Inline Feedbacks
View all comments
sahitya
Guest
4 years ago
Hi
how to switch to linux/ubuntu container from windows server 2016
i have tried multiple things which is of no use
C:\Users\Administrator\Desktop>docker run –interactive –tty ubuntu bash
Unable to find image ‘ubuntu:latest’ locally
latest: Pulling from library/ubuntu
docker: no matching manifest for windows/amd64 10.0.14393 in the manifest list entries.
See ‘docker run –help’.
C:\Users\Administrator\Desktop>docker pull ubuntu
Using default tag: latest
latest: Pulling from library/ubuntu
no matching manifest for windows/amd64 10.0.14393 in the manifest list entries
Thanks for your comment, i have now updated our documentation which explains how to build both Linux and Windows containers. You will need to install Hyper-V role and then follow the instructions on installing Linux containers on Windows.
Hi
how to switch to linux/ubuntu container from windows server 2016
i have tried multiple things which is of no use
C:\Users\Administrator\Desktop>docker run –interactive –tty ubuntu bash
Unable to find image ‘ubuntu:latest’ locally
latest: Pulling from library/ubuntu
docker: no matching manifest for windows/amd64 10.0.14393 in the manifest list entries.
See ‘docker run –help’.
C:\Users\Administrator\Desktop>docker pull ubuntu
Using default tag: latest
latest: Pulling from library/ubuntu
no matching manifest for windows/amd64 10.0.14393 in the manifest list entries
please suggest working command to switch
Hi,
Thanks for your comment, i have now updated our documentation which explains how to build both Linux and Windows containers. You will need to install Hyper-V role and then follow the instructions on installing Linux containers on Windows.
Thank you
Andrew