Containerize and Deploy Java Applications
Ayan Gupta demonstrates how the GitHub Copilot app modernization extension containerizes a Java 21 application with Docker, validates it locally, and then provisions Azure infrastructure and deploys to Azure Container Apps using built-in tasks and an agent-driven workflow.
Overview
This episode shows an end-to-end workflow for taking an upgraded Java application (Java 21), containerizing it, testing it locally, and deploying it to Azure.
Containerize the Java app with Copilot tasks
- Uses the GitHub Copilot app modernization extension’s built-in containerization task to:
- Generate Dockerfiles
- Build container images automatically
Agent-driven workflow pattern
Copilot follows a consistent execution pattern:
- Analyze
- Plan
- Get approval
- Execute
The video highlights how to:
- Review the containerization plan before execution
- Edit the plan if needed, then approve it for execution
Validate locally before deploying
- Runs and tests the containerized application locally
- Switches to H2 for local testing
Provision Azure infrastructure and deploy
- Uses the “Provision Infrastructure and Deploy to Azure” task to:
- Generate Bicep (IaC)
- Provision required Azure resources
- Deploy the application to Azure Container Apps
Deployment plan artifacts
Copilot generates supporting artifacts as part of the deployment plan, including:
- Architecture diagrams
- Security configurations
- Execution steps
Links
- Series playlist: https://www.youtube.com/playlist?list=PLlrxD0HtieHhaBJWlcxGd-kTDikSD4xyD
- GitHub Copilot Modernization extension: https://aka.ms/GHCPMod-Java
- Azure Container Apps: https://aka.ms/containerapps