Skip to content

🎯Minimal Flask application containerized with Docker β€” exposes a single JSON endpoint ({"message":"Hey There Python"}) running on port 3000 inside the container and mapped to port 4000 on the host. Demonstrates Python + Flask basics, Docker image building, container execution, and lightweight API deployment.

Notifications You must be signed in to change notification settings

rahulshukla29081999/docker-python-flask-app

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Flask Hey There Python (Dockerized) 🐍🐳

This is a minimal Flask Hey There Python application running inside a Docker container.

The application exposes a single endpoint that returns a JSON message.


πŸ“‚ Project Structure

. β”œβ”€β”€ index.py β”œβ”€β”€ requirements.txt β”œβ”€β”€ Dockerfile └── README.md


🧠 Application Code

The Flask app runs on port 3000 and returns the following response on /:

{"message":"Hey There Python"}

πŸš€ How to Run Using Docker

πŸ”Ή Build Docker Image

docker build -t rahulrokksss/python-flask:0.0.1.RELEASE .

πŸ”Ή Run Docker Container

docker run -d -p 4000:3000 rahulrokksss/python-flask:0.0.

1.RELEASE

πŸ”Ή Access the Application

Open your browser or use curl:

http://localhost:4000

🐳 Docker Hub Image

The image is available on Docker Hub:

rahulrokksss/python-flask:0.0.1.RELEASE

πŸ›  Tech Stack

Python

Flask

Docker

βœ… Output Example

{"message":"Hey There Python"}

πŸ“Œ Notes

Flask runs on 0.0.0.0 to allow external access from Docker

Port 3000 is exposed inside the container

Port 4000 is used on the host machine

✨ Author

Rahul Shukla

About

🎯Minimal Flask application containerized with Docker β€” exposes a single JSON endpoint ({"message":"Hey There Python"}) running on port 3000 inside the container and mapped to port 4000 on the host. Demonstrates Python + Flask basics, Docker image building, container execution, and lightweight API deployment.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published