2

We are building a application using Dotnet 2.0 and Docker. We are running the containers in Linux mode. This works well on our local Windows 10 machines with Docker for Windows, and on AWS ECS. Now we are trying to add a CI pipeline to deploy to AWS ECS.

We set this server up using a AWS windows 2016 AMI running on EC2, but we quickly learned that we cannot use Docker for Windows. We can use the AWS Windows with Containers AMI with docker installed, but this does not support Linux containers.

Is there something we can do to get the machine to support Linux containers? We don't actually have to run Linux containers on the machine, we are just using it to build images, upload them to ECR and use ECS-CLI to run containers. Do we just need to move our build server to a linux AMI to support this (most of the team is lighter on Linux knowlege and a GUI is nice on a build/tools server)

Any thoughts? We are using Jenkins as our CI tool. I have seen the hack to get Linux containers running here but I don't want to use a hack on a important server in our development process.

Cale
  • 597
  • 1
  • 7
  • 17
  • We just decided to use a linux server for our build server. It had to be unbuntu server so we could support Docker CE, dotnet, and jenkins. It would still be good to know when windows decides to support this use case. – Cale Apr 12 '18 at 21:00

1 Answers1

2

I ran into the same problem. The only way I could get Docker for Windows working with Linux containers in EC2 was to use an i3.metal instance type. The Docker for Windows installation finished without a hitch and I was able to run Linux containers on the Windows Server 2016 i3.metal instance without issue.

  • Good tip! Our Ubuntu build server has been working out great for us. – Cale Jan 04 '19 at 21:36
  • Getting a linux container going on an EC2 Windows Server instance requires nested virtualization and a Hyper-V installation; the bare metal instance gets around the nested virtualization part – scurrie Jul 17 '19 at 22:48