Added DockerJenkinsfile

This commit is contained in:
2026-02-25 18:31:16 +01:00
parent 218a07a700
commit 5123d5302e

26
DockerJenkinsfile Normal file
View File

@@ -0,0 +1,26 @@
pipeline {
agent {
node {
label 'docker' //Agent needs to have Docker Engine installed
}
}
stages {
stage('Checkout') {
steps {
// Get some code from a GIT repository
git 'https://git.agile611.com/Agile611/the-example-app-nodejs.git'
}
}
stage('Docker Build') {
steps {
sh 'docker build -t the-example-app.nodejs .'
}
}
stage('Docker Run') {
steps {
// Run Docker image on port 3000
sh 'docker run -p 3000:3000 -d the-example-app.nodejs'
}
}
}
}