Elena' s AI Blog

What is Docker?

11 Feb 2024 (updated: 17 Aug 2026) / 30 minutes to read

Elena Daehnhardt


Midjourney, February 2023


TL;DR:
  • Containerize Flask apps with Docker: create Dockerfile, use 'docker build' and 'docker run'. Docker ensures consistent environments—deploy anywhere without dependency issues. Essential for production.

Previous: Part 2 — Joking Flask App

Next: Part 4 — Logging in Python

Introduction: Dockerising a Python Flask App

Docker lets you quickly deploy microservices, cloud-native architectures, or web apps. In this post, we will use Docker to create a reliable environment for Flask applications that efficiently manages dependencies and deployment intricacies.

What is Docker?

Docker is a platform for developers and sysadmins to build, deploy, and run applications inside containers. Containers are a form of lightweight virtualisation that allows you to package an application, along with its dependencies and libraries, in a single unit that can run on any infrastructure.

This makes creating, managing, and deploying applications easier, especially in a microservices architecture, where an application comprises many small, self-contained services.

In addition to providing an isolated environment for your applications, Docker offers several other benefits, such as increased consistency and reproducibility, better resource utilisation, and easier scaling and deployment.

Docker was developed by Docker, Inc., a company founded in 2010. Docker became popular quickly and was widely adopted by organisations and developers for containerisation. In 2011, Docker, Inc. was acquired by Mirantis, a company specialising in cloud infrastructure software, see Adrian Ionel’s post What We Announced Today and Why it Matters.

Installing Docker (macOS, Windows, Linux)

🔒 Subscribe to keep reading.

Using Docker

🔒 Subscribe to keep reading.

Dockerising a Flask application

🔒 Subscribe to keep reading.

Conclusion: Running Flask in Docker

🔒 Subscribe to keep reading.

References

🔒 Subscribe to keep reading.

Subscribe to unlock the full article ❤️

The form below signs you up for the newsletter. It does not log you into the app — log in afterwards (same email) to unlock this article and download your subscriber gifts. New subscribers get an inbox mail: Set a password to unlock articles.

desktop bg dark

About Elena

Elena, a PhD in Computer Science, simplifies AI concepts and helps you use machine learning.





Citation
Elena Daehnhardt. (2024) 'What is Docker?', daehnhardt.com, 11 February 2024. Available at: https://daehnhardt.com/blog/2024/02/11/python-flask-app-in-docker/
All Posts