This is Python web application with a single endpoint (/) exposed on port 8000. The application is containerized using the Docker.
- Python 3.13.0
- Flask 2.3.2
- Docker 27.2.0
- Create the Virtual Environment:
$ python3 -m venv venv
- Activate the Virtual Environment:
$ source venv/bin/activate # on macOS and Linux
$ venv\Scripts\activate # on Windows
- Install Dependencies:
$ pip install -r requirements.txt
- Run the Application:
$ python main.py
- Test the Application
$ curl http://localhost:8000/
Expected result:
{"first_name":"Hyper","id":"90","last_name":"Skill"}
- Navigate to the project root directory and build the Image:
$ docker build -t flask-app .
- Run the Docker Container:
$ docker run -d -p 8000:8000 flask-app
- Test the Application:
$ curl http://localhost:8000/
Expected result:
{"first_name":"Hyper","id":"90","last_name":"Skill"}