Docker Task fails to pull image if it's using a "rootless" context in Docker

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 10.2.7, 11.0.4, 9.6.16
    • Affects Version/s: 9.4.0
    • Component/s: Docker, Tasks
    • None
    • 1
    • Severity 3 - Minor

      Issue Summary

      The Docker task (Pull image) fails when it is executed because it is missing the meta.json file located inside the context folder.

      When Bamboo copies the content of .docker/config.json to the temporary folder it should it should copy contexts folder as well if it exists

      2025-07-17 13:57:23,199 INFO [0-BAM::ubuntu::Agent:Thread-15] [TaskExecutorImpl] Starting task 'Docker pull' of type 'com.atlassian.bamboo.plugins.bamboo-docker-plugin:task.docker.cli'
      2025-07-17 13:57:23,204 INFO [0-BAM::ubuntu::Agent:Thread-15] [DockerCmd] Successfully copied the default Docker configuration to /home/bamboo/.dockercfg-bamboo-08f335c0-edda-4697-9201-1b30de183fb6
      

      This case was tested specifically for the Docker task (Pull), but it also applies to other commands such as Run-Push-Build.

      Steps to Reproduce

      1. Configure an agent with docker using a rootless context
      2. Execute the Docker task (pull) 
      3. See the error.

      Expected Results

      Successfully executing the Docker task for any particular context in Docker.

      Actual Results

      The following exception is thrown in the build logs or Bamboo agent logs file:

      error    17-Jul-2025 11:55:34    Failed to initialize: unable to resolve docker endpoint: context "rootless": context not found: open /home/bamboo/.dockercfg-bamboo-d66257de-88fa-4212-a538-8acef84d856e/contexts/meta/12b961af5feb3e9d39f93b2cefb9a1a944f18d02cca0cac2f04f5a982240605f/meta.json: no such file or directory  

      Workaround

      Executing the Docker pull task as a command in a script task.

              Assignee:
              Alexey Chystoprudov
              Reporter:
              Jonathan Barth (Inactive)
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: