Dockerize a Python Application: Work with Containers

A guide on how to dockerize a Flask application.

Konstantinos Patronas
Python in Plain English
5 min readOct 4, 2020

--

In this scenario we have a simple Flask application that we want to dockerize, our application consists of a single file named server.py.

Directory Structure

Our application directory structure is the following

./app/
├── Dockerfile
├── requirements.txt
└── src
└── server.py
1 directory, 3 files

server.py

--

--