This project demonstrates containerization of a Python Flask application using Docker and automation of the build pipeline using GitLab CI/CD.
- Containerization of a Python Flask app using Docker.
- Automated build pipeline using GitLab CI/CD.
- Organized multi-stage pipeline (Build and Test).
- Docker: For creating lightweight, portable containers.
- GitLab CI/CD: For pipeline automation.
- Python (Flask): As the sample application framework.
- Docker installed on your system.
-
Clone this repository:
git clone https://github.com/<your-username>/<repo-name>.git cd <repo-name>
-
Build the Docker image:
docker build -t python-app
-
Run the container:
docker run -p 5000:5000 python-app
-
Access the application:
Open your browser and navigate to http://localhost:5000.
The GitLab CI/CD pipeline automates the following stages:
Build: Builds the Docker image for the Flask app.
Test (Optional): Runs unit tests(NIL for Now)
```bash
<repo-name>/
├── app.py # Main Flask application
├── Dockerfile # Docker image instructions
├── requirements.txt # Python dependencies
├── .gitlab-ci.yml # CI/CD pipeline configuration
└── README.md # Project documentation