This project contains simple PHP website. This website is packaged into docker container. Container is hosted in Azure Web App.
Define first dockerfile based on documentation. We have dockerfile with simple php webpage.
Get sourcecode from this repository and run. Dockerfile compiles resources to be working with Web App, check this link.
docker build jjwebphp -t jjwebphp
docker imagesRun docker image locally, check you have docker support on your machine.
docker run -it -p 80:80 jjwebphpRun browser with http://localhost
We will use Azure Container Repository service. Create new service with name jjcontainers.azurecr.io
Login into new Azure Container Repository with provided credetials - found on Access keys
docker login jjcontainers.azurecr.io -u jjcontainers -p <password>
docker tag jjwebphp jjcontainers.azurecr.io/jjwebphp
docker push jjcontainers.azurecr.io/jjwebphpBrowse Azure portal and create new service Web App for Containers (Microsoft publisher) - name jjweblinux.
Select Azure Container Repository, specify images and click Create.

Browse website http://jjweblinux.azurewebsites.net
Azure Application Insights gives you great telemetry about using your website (jjwebphpai). To enable it, go to Web App, select Monitoring section and enable AI. The resource in Azure will be created. Use Application Insights for PHP extension.
Install PHP composer to get Application Insights packages. https://getcomposer.org/download/
cd jjwebphpai/src
php ~/composer.phar install
docker build jjwebphpai -t jjwebphp
docker imagesThis project contains simple PHP website. This website is running in Azure Web App with enabled PHP framework.
How to deploy in Web App ? https://docs.microsoft.com/en-us/azure/app-service/app-service-web-get-started-php
How to customize Web App settings ? https://docs.microsoft.com/en-us/azure/app-service/web-sites-php-configure
Compile image and publish into Azure Container Registry associated with Azure Kubernetes Service (AKS).
docker build jjwebphpai -t jjwebphpai
docker tag jjwebphpai jjdotnetcoreaf9d.azurecr.io/jjwebphpai:1
ddocker push jjdotnetcoreaf9d.azurecr.io/jjwebphpaiPublish service in AKS
- Run AKS dashboard
- Select Overview and Create an App
- Type your container and Service External
Or you can use json definition from charts folder.
After several minutes there will be published external IP on AKS dashboard.
More details how to leverage AKS use this repo https://github.com/jjindrich/jjazure-web-dotnetcore
