Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

615
Visualizações
Jenkins. Invalid agent type "docker" specified. Must be one of [any, label, none]

My JenkinsFile looks like:

pipeline {
    agent { 
        docker { 
            image 'node:12.16.2'
            args '-p 3000:3000'
        } 
    }
    stages {
        stage('Build') {
            steps {
                sh 'node --version'
                sh 'npm install'
                sh 'npm run build'
            }
        }
        stage ('Deliver') {
            steps {
                sh 'readlink -f ./package.json'
            }
        }
    }
}

I used to have Jenkins locally and this configuration worked, but I deployed it to a remote server and get the following error:

WorkflowScript: 3: Invalid agent type "docker" specified. Must be one of [any, label, none] @ line 3, column 9.
           docker { 

I could not find a solution to this problem on the Internet, please help me

over 4 years ago · Santiago Trujillo
2 Respostas
Responde à pergunta

0

You have to install 2 plugins: Docker plugin and Docker Pipeline. Hope that helps.

over 4 years ago · Santiago Trujillo Relatório

0

instead of agent { docker { image 'node:12.16.2' args '-p 3000:3000' } }

try agent { any { image 'node:12.16.2' args '-p 3000:3000' } }

that worked for me.

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda