Skip to content

Container doesn't start correctly in Jenkins pipeline #53

@mkilivan

Description

@mkilivan

I run Jenkins in Docker on Ubuntu 16.04 machine. I added a new pipeline item in Jenkins. The declarative pipeline is shown below.

Jenkinsfile (Declarative Pipeline)

pipeline {
    agent {
        docker {
            image 'crops/poky'
        }
    }
    stages {
        stage('Stage 1') {
            steps {
                sh 'uname -a'
            }
        }
    }
}

I got the following error when I run the build.

ERROR: The container started but didn't run the expected command. Please double check your ENTRYPOINT does execute the command passed as docker run argument, as required by official docker images (see https://github.com/docker-library/official-images#consistency for entrypoint consistency requirements).
Alternatively you can force image entrypoint to be disabled by adding option --entrypoint=''.

What's wrong with the ENTRPOINT?

Is this correct way to use crops/poky in Jenkins pipeline?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions