• 10

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 191


File: /home/prodcxja/public_html/questions/application/views/question.php
Line: 191
Function: _error_handler

File: /home/prodcxja/public_html/questions/application/controllers/Questions.php
Line: 433
Function: view

File: /home/prodcxja/public_html/questions/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

How do I run docker agent in Jenkins on RHEL base image?

I have Jenkins running on RHEL 8. I am trying to run my pipeline, but it is not working, and I think it might be an issue with Podman, because I am able to run the pipeline on my machine which uses docker-ce.

I have already configured the jenkins user on /etc/subuid file and rebooted. Now I am getting another docker related error.

Here is the log:

Checking out Revision 113a2a700837d2de2ed99eabec4ff994b1392a6a (origin/master)
 > git config core.sparsecheckout # timeout=10
 > git checkout -f 113a2a700837d2de2ed99eabec4ff994b1392a6a # timeout=10
Commit message: "Jenkins"
[Pipeline] }
[Pipeline] // stage
[Pipeline] withEnv
[Pipeline] {
[Pipeline] isUnix
[Pipeline] sh

+ docker inspect -f . node:12
[Pipeline] withDockerContainer
ERROR: Failed to parse docker version. Please note there is a minimum docker version requirement of v1.7.
Jenkins does not seem to be running inside a container
$ docker run -t -d -u 993:990 -p 3000:3000 -w /var/lib/jenkins/workspace/blade-runner-pipeline -v /var/lib/jenkins/workspace/blade-runner-pipeline:/var/lib/jenkins/workspace/blade-runner-pipeline:rw,z -v /var/lib/jenkins/workspace/blade-runner-pipeline@tmp:/var/lib/jenkins/workspace/blade-runner-pipeline@tmp:rw,z -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** -e ******** node:12 cat
$ docker top c35bc763bb7bfedffa2a3629ee8e48132d9175df6e43fea207262c13c1372f3f -eo pid,comm

[Pipeline] // withDockerContainer
[Pipeline] }
[Pipeline] // withEnv
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
java.io.IOException: Cannot retrieve .Image from 'docker inspect c35bc763bb7bfedffa2a3629ee8e48132d9175df6e43fea207262c13c1372f3f'
    at org.jenkinsci.plugins.docker.workflow.client.DockerClient.inspectRequiredField(DockerClient.java:225)
    at org.jenkinsci.plugins.docker.workflow.client.DockerClient.getContainerRecord(DockerClient.java:352)
    at org.jenkinsci.plugins.docker.workflow.WithContainerStep$Execution.start(WithContainerStep.java:209)
    at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:286)
    at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:179)
    at org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:122)
    at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:48)
    at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
    at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)

and my Jenkinsfile

pipeline {
      agent {
        docker {
          image 'node:12' 
            args '-p 3000:3000' 
      stages {
        stage('Build') { 
          steps {
            sh 'yarn install' 
            sh 'yarn test'
            sh 'echo " ==== PASSED ===="'

Trending Tags