Edit

Quickstart: Containerize your project using GitHub Copilot modernization for .NET

In this quickstart, you learn how to containerize your project using GitHub Copilot modernization for .NET. The modernization tooling uses GitHub Copilot's AI capabilities to:

  • Analyze your project structure and dependencies
  • Generate Dockerfile configurations
  • Create build-ready Docker images
  • Guide you through the containerization process

Prerequisites

Before you begin, make sure you have:

Note

These prerequisites apply to Visual Studio. For other development environments, see Install GitHub Copilot modernization.

Containerize your project

The GitHub Copilot modernization for .NET containerization feature helps you containerize your project. To start the containerization process, complete the following steps:

  1. Open your project in Visual Studio.

  2. Run App Assessment and open the Assessment Report.

  3. Fix the cloud readiness issues before running the Docker Containerization task.

  4. Make sure you enable appModernizationDeploy in the GitHub Copilot toolbox.

    Screenshot that shows containerization tool selection.

  5. Start containerization by using one of the following approaches:

    • Containerize from Assessment Report: In the assessment report, select Run Task for the Docker Containerization task.

      Screenshot that shows containerization task in assessment report.

    • Use a containerization prompt: You can input the following prompt in Copilot chat to containerize your project:

      Inspect my project and help me plan how to containerize my application using the #appmod-get-containerization-plan tool. Execute the plan. The end goal is to have Dockerfiles that are able to be built.

      Screenshot that shows how to start the containerization process in GitHub Copilot using a prompt.

  6. After you start the process, GitHub Copilot can ask for your approval to use tools or run commands. Grant permission when prompted.

  7. GitHub Copilot analyzes your project and generates a plan. The plan includes a breakdown of your project and steps for containerizing your project.

  8. GitHub Copilot follows the steps to generate a Dockerfile and validate that your Docker image builds successfully.

  9. When GitHub Copilot finishes containerizing your project, it provides a summary of what it did.

Notes

  • Use Claude Sonnet 4 or later models for the best results.
  • Copilot might take a few iterations to fix containerization errors.

Additional resources

  • We leverage certain tools in Containerization Assist. Learn more