This repository contains the source code and instructions for creating a web app in Azure using the Container App service. The web app is built using Docker ๐ณ, and the container image is stored in an Azure Container Registry (ACR) ๐๏ธ. Follow the steps below to set up and deploy the web app.
- Create Azure Container Registry (ACR)
az acr create --resource-group <your-resource-group> --name <your-acr-name> --sku Basic
- Clone the Repository
git clone https://github.com/Mouhamed-dridi/thebatman.git
- Create Dockerfile Navigate to the project directory and create a Dockerfile (e.g., MyDockerfile) using your preferred text editor (e.g., nano).
cd thebatman
nano MyDockerfile
- Build Docker Image and Push to ACR
az acr build --image apache --registry <your-acr-name> --file MyDockerfile .
- Deploy Container to Azure Container Instance
az container create --resource-group <your-resource-group> --name apache --image <your-acr-name>/apache --registry-login-server <your-acr-name> --dns-name-label <your-dns-name-label> --ports 80
- Test Container Execution
az container exec --resource-group <your-resource-group> --name apache --exec-command "pwd"
Congratulations! You have successfully created a web app in Azure using the Container App service. For more details and customization options, refer to the official Azure Container Instances documentation.