[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 in Jenkins by Akshay
• 150 points
274 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 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 in Jenkins by Mukul

closed Jul 5 by Vardhan 177 views
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
• 56,960 points
251 views
+2 votes
5 answers
0 votes
2 answers

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

If you are talking about executing another ...READ MORE

answered Jul 31 in Jenkins by Sirajul
• 40,980 points
7,340 views