techtalks-azure-container-apps-demo

A simple example to showcase Azure container apps capabilities using a TechTalks demo with native integration for Dapr and KEDA

View on GitHub

Build docker images

The source code for the application is available in the src folder.

In order to build multiple container images, we use the docker-compose command. Individual container images can be built using the docker build command. The Dockerfile for the TechTalksProducer and TechTalksConsumer applications are available in the src folder.

THe usual practice is to have the Dockerfile in the same project directory as the source code. In this case, we have the Dockerfile in the src folder. This is because we are building multiple container images using the docker-compose command. We are also storing the Dockerfile outside the project directory because both the TechTalksProducer and TechTalksConsumer applications are using a common library TechTalksModel.

Build container images using docker-compose command

To build the docker images, run the docker-compose command by passing the docker-compose-acr.yml file as an argument.


docker-compose -f docker-compose-acr.yml build

This will build the images for both the microservices and tag them with the tag name azurecontainerapp. The images will be pushed to the Azure Container Registry (ACR). If you wish to change the container registry feel free to update the docker-compose-acr.yml file. Replace the ngacrregistry with your container registry name.

Verify the container images

We can verify that the images are created successfully by running the docker images command:


docker images

The output should look like this:

docker images