flask-example icon indicating copy to clipboard operation
flask-example copied to clipboard

Dockerized Flask app: added Docker setup and updated README

Open anandkrsah opened this issue 4 months ago • 0 comments

This Pull Request dockerizes the existing Flask toy app to make it easier to run, consistent across environments, and portable.

Changes included:

  1. Docker setup

    • Added Dockerfile for containerizing the Flask app.
    • Added .dockerignore to avoid copying unnecessary files.
    • Added docker-compose.yml to easily build and run the app with a single command.
  2. Updated requirements

    • Modified requirements.txt to fix dependency conflicts and ensure compatibility with Docker.
  3. Updated README

    • Added a Docker Prerequisites section (Git, Docker, Docker Compose).
    • Added Docker run instructions (build, start, check, stop containers).
    • Explained benefits of Dockerization: easy setup, consistency, portability, and isolation.

Benefits:

  • Easy setup: Run the app anywhere without installing Python or dependencies manually.
  • Consistency: Same behavior in dev, staging, or production environments.
  • Portability: Works on any system with Docker installed.
  • Isolation: Containers prevent conflicts with host system packages.

How to test:

git clone https://github.com/anandkrsah/flask-example.git
cd flask-example
git checkout dockerize-app
docker-compose up -d
Then open: http://localhost:5000/

All containers will start automatically; no additional images or manual setup required.

anandkrsah avatar Sep 14 '25 09:09 anandkrsah