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

+4 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 10, 2019 in Jenkins by Akshay
• 160 points
8,706 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
how to add? sorry i really new on this stuff
Go to Manage jenkins->Global tool configuration->docker and set installation root path there.
you mean /usr/bin/docker
I think it's /var/lib/docker

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 1,169 views
0 votes
1 answer
+2 votes
1 answer
+2 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
• 58,020 points
2,739 views
+2 votes
5 answers
+5 votes
3 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
• 10,620 points
119,804 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP