jenkinsci / jenkinsci/docker-workflow-plugin

[JENKINS-73043] Pipeline fails on rootless docker (context not found)

Open
#715 0 comments 0 reactions 0 assignees View on GitHub
component:docker-workflow-plugin imported-jira-issue priority:minor resolution:unresolved
Dominant language
Java
Stars
527
Forks
422
Avg merge
10m
Merged PRs (30d)
1

Description

Trying to use docker.withRegistry results in:

Failed to initialize: unable to resolve docker endpoint: context "rootless": context not found: open /var/lib/jenkins/workspace/r_PROJECT_NAME_master@​tmp/a5534a4f-0526-4110-af60-6d9dcc324f14/contexts/meta/12b961af5feb3e9d39f93b2cefb9a1a944f18d02cca0cac2f04f5a982240605f/meta.json: no such file or directory

I'm trying to run rootless docker, but AFAIK the issue is with running a non-default context. It should be looking in /var/lib/jenkins/.docker/contexts/meta rather than in workspace.

 


$ docker context inspect rootless

[

    {

        "Name": "rootless",

        "Metadata": {

            "Description": "Rootless mode"

        },

        "Endpoints": {

            "docker": {

                "Host": "unix:///run/user/102/docker.sock",

                "SkipTLSVerify": false


Unknown macro: {{            }

}}

        },

        "TLSMaterial": {},

        "Storage": {

            "MetadataPath": "/var/lib/jenkins/.docker/contexts/meta/12b961af5feb3e9d39f93b2cefb9a1a944f18d02cca0cac2f04f5a982240605f",

            "TLSPath": "/var/lib/jenkins/.docker/contexts/tls/12b961af5feb3e9d39f93b2cefb9a1a944f18d02cca0cac2f04f5a982240605f"


Unknown macro: {{        }

}}


Unknown macro: {{    }

}}

]

---
Originally reported by mkowalczyk_creativa, imported from: Pipeline fails on rootless docker (context not found)


  • status: Open
  • priority: Minor
  • component(s): docker-workflow-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-07

Raw content of original issue

Trying to use docker.withRegistry results in:

Failed to initialize: unable to resolve docker endpoint: context "rootless": context not found: open /var/lib/jenkins/workspace/r_PROJECT_NAME_master@tmp/a5534a4f-0526-4110-af60-6d9dcc324f14/contexts/meta/12b961af5feb3e9d39f93b2cefb9a1a944f18d02cca0cac2f04f5a982240605f/meta.json: no such file or directory

I'm trying to run rootless docker, but AFAIK the issue is with running a non-default context. It should be looking in /var/lib/jenkins/.docker/contexts/meta rather than in workspace.

 


$ docker context inspect rootless
[
    {
        "Name": "rootless",
        "Metadata": {
            "Description": "Rootless mode"
        },
        "Endpoints": {
            "docker": {
                "Host": "unix:///run/user/102/docker.sock",
                "SkipTLSVerify": false


Unknown macro: {{            }

}}
        },
        "TLSMaterial": {},
        "Storage": {
            "MetadataPath": "/var/lib/jenkins/.docker/contexts/meta/12b961af5feb3e9d39f93b2cefb9a1a944f18d02cca0cac2f04f5a982240605f",
            "TLSPath": "/var/lib/jenkins/.docker/contexts/tls/12b961af5feb3e9d39f93b2cefb9a1a944f18d02cca0cac2f04f5a982240605f"


Unknown macro: {{        }

}}


Unknown macro: {{    }

}}
]

  • environment: Jenkins 2.454 on Debian 6.1.69 running Docker version 26.0.0, build 2ae903e

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.