[Pipeline] withDockerContainer Jenkins does not seem to be running inside a container

+3 votes

Hi Team,

I am getting an error while running the Jenkins file tp build and push the docker image into docker hub .

you can reveiw my code github : https://github.com/iakshaykr/webapp.git (using jenkins_pipe branch not master branch )

Jenkinsfile : 

pipeline {
    environment {
        registry= "iakshaykr/webapp"
        registryCredential= 'dockerhub'
    }

    agent { dockerfile true }

    stages {
        stage('Bilding image') {
            steps {
             script {
                 docker.build registry + ":$BUILD_NUMBER"
              }
            }
        }
    }
}

Nov 9, 2019 in Jenkins by Akshay
• 150 points
1,188 views
Have you installed docker, docker plugin/docker pipeline on the latest version? Also make sure to add the installation root path in the configuration tool!

1 answer to this question.

+1 vote
Hey @Karan, I just missed out on adding the installation root path in config tool. Once I did that, it worked like a charm.

Thanks a lot.

@Akshay, try out @Karan's workaround, might help.
answered Nov 14, 2019 by Eric

Related Questions In Jenkins

+1 vote
1 answer
0 votes
0 answers

Developing Continuous Delivery Pipeline using Git, Jenkins, Maven & Tomcat - join link. Registered today but not geeting link to joinin

Developing Continuous Delivery Pipeline using Git, Jenkins, ...READ MORE

Jul 4, 2019 in Jenkins by Mukul

closed Jul 5, 2019 by Vardhan 261 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 57,530 points
447 views
+2 votes
5 answers
+2 votes
2 answers

How to trigger a Jenkins pipeline A in another Jenkins pipeline B?

You can run the following code, its ...READ MORE

answered Jul 5, 2018 in Jenkins by Sophie may
• 9,940 points
14,226 views