A simple Python application demonstrating Docker containerization and CI/CD with Jenkins.
This project showcases a basic Python application that is fully containerized and automated using Jenkins CI/CD pipeline on Linux & Windows.
hello-python/
├── src/
│ └── app.py # Main Python application
├── Dockerfile # Docker container configuration
├── Jenkinsfile # Jenkins CI/CD pipeline definition
└── README.md # This file
- Python 3.11+
- Docker Desktop (for Windows)
- Jenkins (configured on Windows machine)
-
Build the Docker image:
docker build -t hello-python .
-
Run the container:
docker run --rm hello-python
This project includes a Jenkinsfile that automates the build and run process on a Windows-based Jenkins server.
Pipeline Stages:
- Checkout - Clones the repository from GitHub
- Build Docker Image - Builds the Docker image using PowerShell
- Run App - Executes the containerized application
To run the pipeline:
- Create a new Pipeline job in Jenkins
- Point it to this repository:
https://github.com/karadHub/hello-python.git - Jenkins will automatically detect the
Jenkinsfileand execute the pipeline
Note: The pipeline is configured for Windows using PowerShell commands (powershell steps instead of sh).
When the application runs, you'll see:
============================================================
Welcome to jenkins-ai-optimizer Show
by Vaibhav Karad
============================================================
- Python 3.11 - Programming language
- Docker - Containerization
- Jenkins - CI/CD automation (Windows-based)
- Linux & Windows - Operating systems for development and CI/CD
- GitHub - Source code management
- VS Code - Development environment