Shrestha Rajat

Search

Search IconIcon to open search

Last updated Jul 9, 2023 Edit Source

# Windows Container Docker on AWS

#docker #windows #aws

To run windows containers in docker within AWS, launch an EC2with an Windows_Server-2022-English-Core-ContainersLatest-2022.11.10 Pasted image 20230105145020

Make sure to give it plenty of cpu and ram resources so it can peform well.

This will launch an Windows ec2 instance with docker container support.

The dotnet framework docker versions: https://hub.docker.com/_/microsoft-dotnet-framework-runtime/

Blog on configuring dotnet build with codebuild and docker: https://aws.amazon.com/blogs/devops/extending-aws-codebuild-with-custom-build-environments-for-the-net-framework/

Article found with demo of how to use docker CLI in Windows docker setup: https://web.archive.org/web/20220120042518/https://www.docker.com/blog/build-your-first-docker-windows-server-container/

Oneliner google chrome silent installer powershell: https://www.snel.com/support/install-chrome-in-windows-server/

Command to switch from windows container <> linux containers: (This method Didin’t work for the mirantis) https://forums.docker.com/t/cli-to-switch-between-linux-and-windows-images/30297

Extensive article on using docker within WSL (useful for linux containers): https://dev.to/_nicolas_louis_/how-to-run-docker-on-windows-without-docker-desktop-hik

# Docker containers for windows on aws codepipeline

https://aws.amazon.com/blogs/devops/building-windows-containers-with-aws-codepipeline-and-custom-actions/#:~:text=AWS%20CodeBuild%20supports%20Windows%20builds,NET%20Framework%20SDK%20installed).

# Limitations: (????)

The last point is the critical one for microservice type of applications based on Microsoft stacks (.NET Framework, Web API, IIS). The usual workflow for this kind of applications is to build a Docker image, push it to ECR and update ECS / EKS cluster deployment.

# Custom AWS codebuild with ephemeral windows container envs:

https://github.com/aws-samples/aws-codepipeline-custom-action

https://aws.amazon.com/blogs/devops/building-windows-containers-with-aws-codepipeline-and-custom-actions/#:~:text=AWS%20CodeBuild%20supports%20Windows%20builds,NET%20Framework%20SDK%20installed

# ALT:

https://aws.amazon.com/blogs/modernizing-with-aws/building-windows-containers-with-aws-codepipeline-on-aws-govcloud-us/

# Windows containers:

More on what windows containers are: https://learn.microsoft.com/en-us/virtualization/windowscontainers/about/

Preparing windows for containers: https://learn.microsoft.com/en-us/virtualization/windowscontainers/quick-start/set-up-environment?tabs=containerd Pasted image 20230106173933 Pasted image 20230106173955 https://hub.docker.com/_/microsoft-dotnet-framework-runtime/ Pasted image 20230106182532

windows vs linux container service Pasted image 20230106173745

https://www.youtube.com/watch?v=RjwzADNGUUg

https://drive.google.com/file/d/1KK56yO8XTgSZ7jTjstz1ZAFCM2a2co-0/view