Tuesday, May 18, 2021
Home CI-CD Jenkins. Invalid agent type “docker” specified. Must be one of

Jenkins. Invalid agent type “docker” specified. Must be one of [any, label, none]

Jenkins is working with plugins, if you didn’t install Docker and Docker Pipeline plugins you can get this error. “Jenkins. Invalid agent type “docker” specified. Must be one of [any, label, none]”. You can fix this error with following steps;

Go to the

  • Dashboard -> Manage Jenkins -> Manage Plugins -> Available tab
  • Select Docker and Docker Pipeline from the list

docker and docker pipeline plugin
docker and docker pipeline plugin
  • Then click Install, after restart, plugins should be available.

It is better to have docker installed also on your worker nodes.

Here you can find a sample declarative style pipeline to test your Jenkins.

pipeline {
    agent { docker { image 'maven:3.3.3' } }
    stages {
        stage('build') {
            steps {
                sh 'mvn --version'
            }
        }
    }
}

Burak Cansizogluhttp://devopsmania.com/
Burak is working as a freelance Cloud/DevOps consultant. He performed different roles during his professional career track. He has more than 12 years of experience in the finance, telecommunication and government sectors. He likes to learn new technologies and wants to share his knowledge, experiences with the community. He likes all lean, agile initiatives. And he believes that the DevOps mindset and DevOps transformation will bring more agility to the Enterprises as well as employees.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Most Popular

Jenkins. Invalid agent type “docker” specified. Must be one of [any, label, none]

Jenkins is working with plugins, if you didn't install Docker and Docker Pipeline plugins you can get this error. "Jenkins. Invalid agent...

How to install Minishift on Windows10?

Minishift is the compact all-in-one solution of OpenShift community distribution in a Virtual Machine(VM). It allows developers and curious minds to run...

How is Docker different from a Virtual Machine?

Docker containers are isolated processes within their namespaces. Virtual Machines are full-blown Operating Systems (OS) living on Hypervisors. In this article, we...

How to run a Docker Container in Detached Mode?

When you are running your Docker containers, you can attach them to your current shell or run them as background tasks in...

Recent Comments