Skip to content

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

 
 
 

Contributors