Containerise an ASP.NET Core App

Talk it through out loud with your AI coach.

The problem

  • easy
  • Pro

You need a container image for an ASP.NET Core 8 API to run on AWS. Explain how you'd build a small, secure image, and what's different about recent .NET images compared with older guides you might find.

What a strong answer covers

  • Separating the build environment from what runs in production.
  • Ordering steps so rebuilds are fast.
  • Defaults in current .NET images that older advice predates.
  • Ways to shrink the image further or build and publish it.

Common mistake: Shipping the full SDK image to production, which makes it several times bigger and gives an attacker compilers to use.

Knowing this is half of it. Saying it clearly out loud is the part the coach helps you practise.

Practise it out loud