From 8879187940d0856fed829af39163c7b005c495e1 Mon Sep 17 00:00:00 2001 From: Suraj kumar <108623639+surajkumarsingh03@users.noreply.github.com> Date: Sun, 8 Dec 2024 18:46:41 +0530 Subject: [PATCH] Create Jenkinsfile --- Jenkinsfile | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Jenkinsfile diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..cd376fd --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,24 @@ +pipeline { + agent any + stages { + stage('Clone Repository') { + steps { + git 'https://github.com/docker/getting-started-app.git' + } + } + stage('Build Docker Image') { + steps { + script { + sh 'docker build -t todo-app .' + } + } + } + stage('Run Docker Container') { + steps { + script { + sh 'docker run -d -p 3000:3000 todo-app' + } + } + } + } +}