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
    • Migrate to AWS
    • DevOpsDevOps, AWS Cloud Consulting
    • StorageData Storage
    • Financial Services
  • Services
    • AWS Services
      • AWS Well-Architected Framework
      • Focus on Video AI/ML
      • Chime SDK
      • DevOps Guru
      • Virtual Desktop/Studio in the Cloud
      • Amazon API Gateway
      • AWS Lambda
      • Amazon DynamoDB
      • Amazon EKS
      • Amazon OpenSearch
      • Amazon CloudFront
      • AWS Elemental MediaConvert
    • Hammerspace Integration
    • Focus on Penetration Testing
    • Autodesk Service Provider
  • Resources
    • Blogs
    • White Papers
    • Case Studies
    • Press Releases
    • Trainings and Workshops – Unlock TrackIt’s Power
  • Tools & Apps
    • TrackIt Cost Management App
    • Tagbot
    • AI Video Reviewer
    • Trackflix
  • Managed Services
  • 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

ami API Aurora aws AWS EC2 AWS S3 AWS Studio in the Cloud chargify Ci Cd Pipeline Circleci cloud Cloud Computing Cognito consul cost optimization dedicated Demonstration DevOps docker Dynamodb ec2 ESXi github Hammerspace hashicorp high availability HP Anyware HPA Tech Retreat 2023 HPTeradici json Marketing Media Workflows nomad open source packer pfSense Postgres public cloud reduce cost Remote Serverless terraform tutorial Video Windows Containers

Jan. 23, 2019

—

Migrating Windows Application to Containers on ECS : Our Experience 2019

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.

Migrating Windows Application to Containers on ECS : Our Experience 2019 - docker logo

Introduction

Migrating a web application to Docker can provide many benefits, such as increased portability, scalability, and easier management. However, when dealing with Windows-based applications, there are some unique challenges and limitations to be aware of. In this article, we will discuss our experience migrating an ASP web application to Docker on Windows, including the process of building and deploying Docker images, as well as some unexpected issues we encountered along the way. We’ll also provide some helpful workarounds and strategies to overcome these challenges and ensure that your containers are running smoothly on ECS.

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)
Migrating Windows Application to Containers on ECS : Our Experience 2019 - image 1

Conclusion

In conclusion, migrating an ASP web application to Docker on Windows may present some challenges and limitations, but these can be overcome with the right strategies and workarounds. It’s important to build your Docker image on the same system as your target and to be aware of bugs and issues that may arise, such as unexpected exits on Windows IIS. By setting the network mode to default, task memory to 1024mb, and CPU units to 1024, you can fix this issue and ensure that your containers are running smoothly on ECS. With the right approach, Docker can be an effective tool for deploying and managing web applications on Windows.

About TrackIt

TrackIt, an Amazon Web Services Advanced Consulting Partner based in Marina del Rey, CA, offers a range of cloud management, consulting, and software development solutions. Their expertise includes Modern Software Development, DevOps, Infrastructure-As-Code, Serverless, CI/CD, and Containerization, with a focus on Media & Entertainment workflows, High-Performance Computing environments, and data storage.

TrackIt excels in cutting-edge software design, particularly in the areas of containerization, serverless architectures, and pipeline development. The company’s team of experts can help you design and deploy a custom solution tailored to your specific needs.

In addition to cloud management and modern software development services, TrackIt also provides an open-source AWS cost management tool to help users optimize their costs and resources on the platform. With its innovative approach and expertise, TrackIt is the ideal partner for organizations seeking to maximize the potential of their cloud infrastructure.

Logo1 colour RGB 8
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

    • TrackIt 578 Washington Blvd #260 Marina Del Rey, CA 90292
  • @TrackIt 2022