简体   繁体   中英

Jenkins pipeline docker run -it

I try this, but it doesn't work and I see the input device is not a TTY error.

我的密码

How to solve it?

How the documentation said to use Docker in your pipeline is necessary to set up Docker agent.

pipeline {
    agent {
        docker { image 'node:7-alpine' }
    }
    stages {
        stage('Test') {
            steps {
                sh 'node --version'
            }
        }
    }
}

Check out the doc https://jenkins.io/doc/book/pipeline/docker/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM