Docker port variable is null when host port is empty

XMLWordPrintable

    • Type: Bug
    • Resolution: Cannot Reproduce
    • Priority: Low
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Severity 3 - Minor

      Summary

      Docker port variable is null when a port mapping is added with no host port (implicit port, docker will bind the container port to whatever it finds available on the host).

      Steps to Reproduce

      1. Create a Bamboo plan with a Docker task with the below config:
        • Command: Run a docker container
        • Detach container [x]
        • Add a port mapping: Host empty, Container: 8085
        • Wait for service to start [x]
        • Service URL pattern: http://localhost:${docker.port}
      2. Run a build

      Expected Results

      Host port is found and tested successfully during build.

      Actual Results

      25-Oct-2017 12:11:58	Attempting connection to http://localhost:null
      25-Oct-2017 12:11:58	Failed connecting to http://localhost:null, error: invalid port number
      

      Workaround

      None

            Assignee:
            Unassigned
            Reporter:
            Jeremy Owen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: