Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
In this Quickstart, you containerize your Java project using GitHub Copilot app modernization.
To use container compute services like Azure Kubernetes Service and Azure Container Apps, developers need to containerize their project by creating Dockerfile and other related configuration files, and build container images. Our tools help you complete the containerization process.
Prerequisites
- A GitHub account with GitHub Copilot enabled. A Pro, Pro+, Business, or Enterprise plan is required.
- One of the following IDEs:
- The latest version of Visual Studio Code. Must be version 1.101 or later.
- GitHub Copilot in Visual Studio Code. For setup instructions, see Set up GitHub Copilot in Visual Studio Code. Be sure to sign in to your GitHub account within Visual Studio Code.
- GitHub Copilot app modernization. Restart Visual Studio Code after installation.
- The latest version of IntelliJ IDEA. Must be version 2023.3 or later.
- GitHub Copilot. Must be version 1.5.59 or later. For more instructions, see Set up GitHub Copilot in IntelliJ IDEA. Be sure to sign in to your GitHub account within IntelliJ IDEA.
- GitHub Copilot app modernization. Restart IntelliJ IDEA after installation. If you don't have GitHub Copilot installed, you can install GitHub Copilot app modernization directly.
- The latest version of Visual Studio Code. Must be version 1.101 or later.
- Java 21 or later.
- Maven or Gradle to build Java projects.
Note
If you're using Gradle, only the Gradle wrapper version 5+ is supported. The Kotlin Domain Specific Language (DSL) isn't supported.
The function My Tasks isn't supported yet for IntelliJ IDEA.
Containerize your project
Use the following steps to start your containerization process:
Make sure you have Docker installed and running.
In Visual Studio Code, open your migrated project.
In the Activity sidebar, open the GitHub Copilot app modernization extension pane.
In the Tasks section, open Migration Tasks and select Containerize Application.
After you select the task, the Copilot chat window with Agent Mode opens automatically.
Select Continue repeatedly to confirm each tool action in the Copilot Chat window. The Copilot Agent uses various tools to facilitate containerization. Each tool's usage requires confirmation by selecting Continue.
Copilot typically goes through the following steps to containerize your project:
- Checks that docker is installed and running.
- Checks that the application code is ready to run in a container.
- Creates a Dockerfile for each project.
- Builds docker images for each project.
- Creates a summary of the containerization results.
Note
We recommend using Claude Sonnet 4 or later models for the best results.
It might take Copilot a few iterations to correct containerization errors.