Prerequisites
The sample application used in this tutorial is a basic voting app. The application consists of a front-end web component and a back-end Redis instance. The web component is packaged into a custom container image. The Redis instance uses an unmodified image from Docker Hub.
In the first part of this application we will do the following:
Use git to clone the sample application to your development environment:
git clone https://github.com/Azure-Samples/azure-voting-app-redis.git
Change into the cloned directory.
cd .azure-voting-app-redis
Use the sample docker-compose.yaml file to create the container image, download the Redis image, and start the application: docker-compose up -d
When completed, use the docker images command to see the created images. Three images have been downloaded or created. The azure-vote-front image contains the front-end application and uses the nginx-flask image as a base. The Redis image is used to start a Redis instance.
docker images
Run the docker ps command to see the running containers: docker ps
To see the running application, enter http://localhost:8080 in a local web browser. The sample application loads, as shown in the following example:
Stop and remove the container instances and resources with the docker-compose down command:
Now, in the second part of the demo, we will push our application to Azure Container Registry.
You can see part two of the demo by going to the link here.