Cannot bind host directory to agent home on bamboo-agent-base

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 8.1.1, 8.0.9
    • Affects Version/s: 7.2.4
    • Component/s: Docker
    • 1
    • Severity 3 - Minor
    • 0

      Issue Summary

      When running the Docker agent image, the agent home can't be a bind-mount volume to the host server.

      Steps to Reproduce

      1. Start an agent with docker run:
        docker run -d \
            --name bambooagent \
            --init -v /home/ezeidan/dockerdata/bambooagent/:/home/bamboo/bamboo-agent-home \
             atlassian/bamboo-agent-base http://bambooserver:8085
        
      2. Check docker ps, docker ps -a and docker logs bambooagent

      Expected Results

      • docker ps and docker ps -a both show the agent running
      • docker logs bambooagent show the standard remote agent setup/install logs

      Actual Results

      • docker ps is empty
        $ docker ps
        CONTAINER ID   IMAGE     COMMAND   CREATED   STATUS    PORTS     NAMES
        
      • docker ps -a shows the agent exited with exit code 1
        $ docker ps -a
        CONTAINER ID   IMAGE                         COMMAND                  CREATED         STATUS                     PORTS     NAMES
        257be05a4d59   atlassian/bamboo-agent-base   "./runAgent.sh http:…"   2 seconds ago   Exited (1) 2 seconds ago             bambooagent
        

        The below exception is shown in the docker logs bambooagent output:

        cp: cannot create regular file '/home/bamboo/bamboo-agent-home/bin/bamboo-capabilities.properties': No such file or directory
        

      Workaround

      Use a named volume for the mount.

            Assignee:
            Unassigned
            Reporter:
            Ellie Z
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: