TrackIt – Cloud Consulting & S/W Development
  • Home
  • Solutions
    • Media & EntertainmentMedia & Entertainment
    • HPC – High Performance ComputingHigh Performance Computing
    • Software DevSoftware Development; Serverless, CI/CD, UI/UX, API Integration
    • DevOpsDevOps, AWS Cloud Consulting
    • StorageData Storage
    • Financial Services
  • Services
    • AWS Services
      • AWS Well-Architected Framework
      • Video AI/ML
      • Chime SDK
      • DevOps Guru
      • Virtual Desktop/Nimble Studio
      • Amazon API Gateway
      • AWS Lambda
      • Amazon DynamoDB
      • Amazon CloudFront
      • AWS Elemental MediaConvert
    • Hammerspace Integration
    • Penetration Testing
  • Resources
    • Blogs
    • White Papers
    • Case Studies
    • Press Releases
  • Tools & Apps
    • TrackIt Cost Management App
    • Tagbot
    • AI Video Reviewer
    • Trackflix
  • About Us
header image

TrackIt Blogs

Read the latest cloud technology news and learn new tips and tricks to get the most out of your cloud.

  • Contact Us

Categories

Automation AWS data rooms Data Storage DevOps DevTools Monitoring Optimization Services TrackIt

Tags

ai ami API Aurora autoscaling aws AWS EC2 AWS S3 chargify Ci Cd Pipeline Circleci cloud Cloud Computing Cognito consul cost optimization dedicated DevOps docker Dynamodb ec2 ESXi github hashicorp high availability IP json Marketing nomad open source packer pfSense Postgres public cloud reduce cost Serverless terraform trackit tutorial Video VM vmware windows Windows Containers

Jan. 23, 2019

—

Migrating Windows application to containers on ECS: our experience

We recently had to migrate an ASP web application to Docker. ECS fully supports Windows containers, if you are aware of some limitations and workaround compared to Linux.

Using Docker on Windows

When using Docker on your own machine, it only supports Linux images. To build and use Windows images, you will need to enable the experimental and Windows support mode.

Building the containers

Before deploying our containers on ECS, we had to build the Docker image of our application. So naturally, we build it on our own Windows 10 desktop. We tested it, it was working fine so we pushed it to ECR.
Once deployed on ECS, the container was unable to launch :
image operating system “windows” cannot be used on this platform

To our surprise, a windows built on Windows 10 couldn’t be running on Windows server 2016. You have to build on the same system than your target. My advice would be to build your container on the same ami than your ECS instances.

Fix unexpected exits on Windows IIS

In our case, the application was running on IIS, the Microsoft webserver. In theory everything should have been working. But the container was exiting unexpectedly with no logs or specific error more than “Service ‘w3svc’ has been stopped”.

It’s due to a bug in ECS, where if you leave the CPUcredits for the containers at 0, it will not give all ressources to the container, and will instead set CPUPercent to 1

To fix this you need to do the following inside your task definition:

  • Set the network mode to default
  • Set the task memory to 1024mb
  • Set CPU units of your container definition to 1024 (corresponds to CPUPercent at 25)
Previous Next

AWS Advanced Consulting Partner - Cloud Management, Consulting, and Software Development Solutions

Quick links

    • Home
    • Solutions
    • Services
    • White Papers
    • Blog
    • About Us

Tools & Apps

    • TrackIt AI Video Reviewer
    • Trackflix
    • TrackIt App
    • Tagbot

get in touch

    • Phone: +1 323-230-0042
    • Email: info@trackit.io

    • Los Angeles, CA
  • @TrackIt 2022