Skip to content

Latest commit

Β 

History

History
75 lines (39 loc) Β· 1.13 KB

File metadata and controls

75 lines (39 loc) Β· 1.13 KB

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