Jenkins Pipeline: Automatic Nginx Deployment in Docker
This Jenkins pipeline automates the process of deploying an Nginx container on a remote RHEL server using Docker. It also configures the firewall and performs an automated test to verify if Nginx is running properly.
🔶 Pipeline Steps:
- ✅ Install Docker: Ensures Docker is installed and running on the remote RHEL server.
- ✅ Pull Nginx Image: Downloads the latest official Nginx Docker image from Docker Hub.
- ✅ Run Nginx Container: Starts the Nginx container and exposes it on port 80.
- ✅ Configure Firewall: Opens port 80 to allow HTTP traffic.
- ✅ Test Nginx: Verifies that Nginx is running and responding using a curl command.
📜 Pipeline Code:
Loading pipeline code...