Uploaded image for project: 'jclouds'
  1. jclouds
  2. JCLOUDS-1153

Docker ImageToImage class doesn't support empty repoTags list

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.9.2
    • 2.0.0
    • jclouds-labs
    • Docker version 1.12

    Description

      When a Docker image doesn't contain any repoTag, then the `ImageToImage` function fails with

      java.lang.IndexOutOfBoundsException: position (1) must be less than the number of elements that remained (1)
      

      So the current implementation of listing Docker images fails when there is an image with empty repoTags field. (E.g. It happens after pulling a new "latest" tag of an image and the original image didn't have any other tags).

      IMO the original intention was to throw NPE by this call in the ImageToImage.apply() method:

      String description = checkNotNull(Iterables.getFirst(from.repoTags(), "image must have at least one repo tag"));
      

      but it instead sets the description to "image must have at least one repo tag" and it fails later on splitting the value.

      Attachments

        Activity

          People

            Unassigned Unassigned
            kwart Josef Cacek
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: