Chendrayan Venkatesan


My First Experience with Azure Container Apps

Pode | PowerShell | PSHTML | Azure Container Apps

Chendrayan Venkatesan

3-Minute Read



  1. Matthew Kelly | Author of Pode PowerShell module.
  2. PowerShell Microservice - Hello World by Doug Finke
  3. Stephane Van Gulick | Author of PSHTML PowerShell module.


Azure Container Apps is a super catchy, fantastic serverless container service and won many hearts post the announcement in Microsoft Ignite 2021. This blog post walks you through the simple steps to deploy a PowerShell web application to say hello world.

Disclaimer: This is my first experience using the container app. So, only fundamentals are my focus.

Tell about Azure Container Apps

  1. In short, it’s a fully managed serverless container that allows us to deploy modern apps and micro-services.
  2. Many developers experience complexity in Kubernetes. Yes, there are many tools around to overcome it. However, Azure Container Apps allows developers to focus more on the code, and the rest are all managed by Microsoft.
  3. Allows hosting HTTP-based API, microservices, event processing, and background task.
  4. Auto-scaling
  5. Simple configurations to perform modern app / micro-services lifecycle tasks.

How about the pricing?

For now, it’s answered in the FAQ.

Could you show us what you have?

Oh yeah! No more theory. Let us get on the action!


  1. Pode and PSHTML modules.
  2. VSCode (or any IDE).
  3. PowerShell 7.1.2 (6.0 + for Kestrel routing in Pode.)
  4. Azure Account.
  5. Docker Account.
  6. Docker CLI.

Project Structure

┣ 📂.git
┣ 📂src
┃ ┣ 📂views
┃ ┃ ┣ 📜home.ps1
┃ ┣ 📜app.ps1
┃ ┗ 📜Dockerfile
┗ 📜readme.md

App (Main File to Start the Server)

Start-PodeServer -Threads 2 {
    Add-PodeEndpoint -Address * -Port 3000 -Protocol Http
    Set-PodeViewEngine -Type PSHTML -Extension PS1 -ScriptBlock {
        param($path, $data)
        return (. $path $data)
    Add-PodeRoute -Method Get -Path '/' -ScriptBlock {
        Write-PodeViewResponse -Path 'home.ps1'

Views | Login Page (Home.ps1)


function CustomCard {
    Param (

    Div -Class 'cell-lg-4' -Content {
        Div -Class 'price-item text-center bg-white win-shadow' -Content {
            Div -Class 'price-item-header p-6' -Content {
                Div -Class 'img-container rounded' -Content {
                    img -src $($ImageSrc)
                    Div -Class 'image-overlay op-green' 
return html -Content {
    head -Content {
        Title -Content "Az Container Apps | Home"
        Link -href "https://cdn.metroui.org.ua/v4.3.2/css/metro-all.min.css" -rel "stylesheet"
        script -src "https://cdn.metroui.org.ua/v4/js/metro.min.js"
    body -Content {
        (1..3).ForEach({ br })
        Div -Class 'container' -Content {
            h3 -Class 'Secondary fg-lightRed' -Content 'Work In Progress...' -Style 'text-align:center'
            Div -Class 'row flex-align-center rounded' -Content {
                        CustomCard -ImageSrc $($_)  

Build and Push to DockerRegistry

FROM mcr.microsoft.com/powershell:latest

WORKDIR /usr/src/app/

COPY . .    

RUN pwsh -c "Install-Module 'Pode', 'PSHTML' -Force -AllowClobber"

CMD [ "pwsh", "-c", "cd /usr/src/app; ./app.ps1" ]

Build and Push

PS C:\reactor> docker build -t chenv/reactor:V1.0.0 .
PS C:\reactor> docker push chenv/reactor:V1.0.0

Create Container Apps & Deploy


  1. Pode
  3. Azure Container Apps


Congratulations on running your first Azure Container Apps using PowerShell, Pode and PSHML. There are a lot more coming up in the future, and please feel free to subscribe to my YouTube channel - iAutomate and follow me on Twitter ChendrayanV

Say Something


Nothing yet.

Recent Posts



Dedicated IT professional with a history of meeting company goals utilizing consistent and organized practices, skilled in working under pressure....