How can I run Docker in a AWS Windows Server environment?

21,002

EC2 instances do not allow for nested virtualization (EC2 instances are themselves virtual machines). Docker for Windows uses Hyper-V under the hood, and Docker Toolbox uses Virtualbox under the hood, so neither of those solutions are viable.

Even if you were able to run them on a Windows EC2 instance, the performance wouldn't be that great due to the fact that Docker for Windows mounts files into the Docker VM via Samba, which is not very fast.

If you want to run Linux containers, you should probably run them on Linux. It's very fast to get set up, and all of the Docker commands that you're used to with Docker for Windows should still work.

Share:
21,002
J-Roel
Author by

J-Roel

I'm mainly a javascript full-stack developer, but I have experience in Unity3D, Torque3D, MS Excel VBA/Macros, C#/XMAL, GIMP(some photobrush), animation with 3D modeling, writing (story and music; play guitar)... experience with various business tools and agile workflow.

Updated on July 09, 2022

Comments

  • J-Roel
    J-Roel almost 2 years

    Thing I'd tried:

    Toolbox on Windows Server 2012 R2. Disabled Hyper-V to allow virtualbox. I cannot enable virtualization as it's on the physical bios.

    Installed Docker EE on Windows Server 2016 w/Containers EC2. Installed correctly. Daemon is running. BUT, I can't pull a single image beside the hello-world:nanoserver. So I hunted down the windowsservercore and nanoserver, still doesn't work because they are out of date. The repo from the frizzm person at Docker.com doesn't work when you try to pull it.

    Started again with a fresh Windows Server 2016 instance. I disabled Hyper-V and installed ToolBox. Doesn't work.

    How do I run Docker in a windows server environment in AWS?

    All of the vids/tuts seem so simple, but I sure can't get it to work. I'm at a lose.

  • makegofast
    makegofast almost 4 years
    There is no reason to downvote this answer just because it doesn't solve the problem the OP has. Sometimes the answer is "it's not possible", such as in this case. The OP didn't specify if they're trying to run Windows or Linux containers in Docker Desktop on Windows in AWS, and that makes a big difference in AWS based on the technologies used and limitations in Windows. If the question is how to run Linux containers in Docker Desktop on Windows in AWS, the correct answer is "it's not possible" (as explained in this answer). Don't downvote someone just because the answer is bad news.
  • learner
    learner almost 4 years
    no need to downvote, just upvote what is the better lead.
  • Ari
    Ari almost 3 years
    Not sure when this didn't become a correct answer, but I am most certainly running docker (which I've installed) on a Windows Server EC2 instance. In which case, it is not a correct or valid answer