Browse Source

更新 'Jenkinsfile'

sifu-gogs 2 years ago
parent
commit
d3cde43096
1 changed files with 3 additions and 5 deletions
  1. 3 5
      Jenkinsfile

+ 3 - 5
Jenkinsfile

@@ -8,15 +8,13 @@ pipeline {
             agent {
                 docker {
                     image 'node:16-alpine'
-                    args '-v /usr/bin/docker:/usr/bin/dockerio -v /var/run/docker.sock:/var/run/docker.sock -v /usr/local/bin/docker-compose:/usr/local/bin/docker-compose'  
                 }
             }
             steps {
                 checkout scm
-                /*docker.image('node:16-alpine') { c ->*/
-                /*    sh 'docker -v'*/
-                /* }*/
-                sh 'dockerio -v'
+                docker.image('node:16-alpine').withRun(""){ c ->
+                    sh 'docker -v'
+                }
                 /* sh 'docker-compose down' */
                 /* sh 'npm install --registry https://registry.npm.taobao.org' */
                 /* sh 'npm run build:prod' */