<p>While you could tar the root volume of the AMI and import it into Docker as mentioned <a href="https://stackoverflow.com/a/35124911/20018488">here</a>, this approach creates a image with unnecessary OS components, kind of defeating Docker’s purpose of lightweight, efficient containers. Instead, I'd recommend refactoring the .NET application to work with a Dockerfile, which is well-documented.</p>

CC BY-SA 4.0
2024-10-18T08:58:25.440Z
2024-10-18T08:58:25.440Z
hakim00
<p>We have a COTS application running on an EC2 Windows server at AWS. This is a .net application that uses RDS Oracle DB as the back end. If we create an ami from the running EC2 instance, can we use it to create Docker? Would this work? Thank you for your help.</p>

<docker><amazon-web-services><amazon-ec2>
build docker of COTS App running on Wind EC2
Sam Wilson
# build docker of COTS App running on Wind EC2

(Asked by: username_0 on 2024-10-17)

We have a COTS application running on an EC2 Windows server at AWS. This is a .net application that uses RDS Oracle DB as the back end. If we create an ami from the running EC2 instance, can we use it to create Docker? Would this work? Thank you for your help.

**Tags:** docker, amazon-web-services, amazon-ec2


---

## 1 answers

### Answer by username_1 on 2024-10-18. Score: 0

While you could tar the root volume of the AMI and import it into Docker as mentioned [here](https://stackoverflow.com/a/35124911/20018488), this approach creates a image with unnecessary OS components, kind of defeating Docker’s purpose of lightweight, efficient containers. Instead, I'd recommend refactoring the .NET application to work with a Dockerfile, which is well-documented.


---

