Jenkins代码详见:
https://gitee.com/roclli/pp4-3-dockerfile.git
Jenkinsfile内容为:1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16pipeline {
// agent { dockerfile true }
agent {
dockerfile {
additionalBuildArgs '-t node-svn:7-alpine'
}
}
stages {
stage('Test') {
steps {
sh 'node --version'
sh 'svn --version'
}
}
}
}
Dockerfile1
2FROM node:7-alpine
RUN apk add -U subversion