In this article we will be going through a basic explanation of docker, creating a flask web app, and then deploying that web app on azure with docker.

What is Docker

Everyone in software development has heard about docker( or maybe you have heard about containers). Well, before docker every new person in software development was going through the same process — download, extract, install, repeat. Then came DOCKER, it has simplified the whole system dependencies process.The best part is, If it works on local it will work in production. Let’s see what does docker mean:

According to Wikipedia

Docker is a set of platform as a service (PaaS) products that uses OS-level virtualization to deliver software in packages called containers.

Now you know about docker… right ?? :P

Docker lets you create a specific environment in which your code can run. You can create the same environments multiple times as it allows replica build.

Now that you have an idea about docker lets talk about containers and images.

Container

Docker Container is like a virtual runtime environment that packages all the code and dependencies. It can be an OS oriented container or an application-oriented container.

Image

Docker image is an immutable file that is comprised of multiple layers. The image is built using all the instructions mentioned in the dockerfile. Each dockerfile instruction creates a new layer.

Creating Flask Web App

Let’s start by creating a simple flask web app. Either you can copy-paste the code below or you can clone the web app from my GitHub. These are the steps to create a web app.

Requirements

Python, Flask, GitHub, Docker, Azure

  1. Make an empty python file with the choice of your IDE(or you can use visual code).

#flask #python #cloud #docker #azure

Deploying Flask webapp with Docker on Azure
5.95 GEEK