pipeline {
agent {
docker { image 'node:16.13.1-alpine' }
}
stages {
stage('Test') {
steps {
sh 'node --version'
}
}
}
}
version: '3.7'
services:
jenkins:
user: root
image: jenkins/jenkins:2.325-jdk11
volumes:
- /home/jenkins/jenkins_home:/var/jenkins_home
- /var/run/docker.sock:/var/run/docker.sock
restart: always
ports:
- 80:8080
- 50000:50000
restart: always