Skip to content

[JENKINS-75610] docker-workflow doesn't set DOCKER_HOST #730

@jenkins-infra-bot

Description

@jenkins-infra-bot

Given a pipeline with a custom `DOCKER_HOST`:

 

node {
    stage('Testing LIMA VM') {
        docker.withServer('unix:///home/user/.lima/lima-test/sock/docker.sock') {
            docker.image('jenkins/agent').inside {
                sshagent(['user_b']) {
                    sh 'ssh-add -l'
                }
            }
        }
    }
}

I get this error: 
ERROR: Failed to run ssh-agent: Error response from daemon: No such container: 85b4f32a54d1292....
 

I've investigated the issue and I think that

@Override public Proc launch(Launcher.ProcStarter starter) throws IOException {
should inject `DOCKER_HOST` into the `starter` envs (using the value from `envHost`)

 

 


Originally reported by jmdesprez, imported from: docker-workflow doesn't set DOCKER_HOST
  • status: Open
  • priority: Minor
  • component(s): docker-workflow-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 2
  • imported: 2025-12-07
Raw content of original issue

Given a pipeline with a custom `DOCKER_HOST`:

 

node {
    stage('Testing LIMA VM') {
        docker.withServer('unix:///home/user/.lima/lima-test/sock/docker.sock') {
            docker.image('jenkins/agent').inside {
                sshagent(['user_b']) {
                    sh 'ssh-add -l'
                }
            }
        }
    }
}

I get this error:  ERROR: Failed to run ssh-agent: Error response from daemon: No such container: 85b4f32a54d1292....  

I've investigated the issue and I think that

@Override public Proc launch(Launcher.ProcStarter starter) throws IOException {
should inject `DOCKER_HOST` into the `starter` envs (using the value from `envHost`)

 

 

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions