Project

General

Profile

Revision 26c5ba32

Added by Daniel Lobato Garcia about 6 years ago

Refs #14570 - Fetch tags from local images properly

We were calling local_images and passing an ID as filter. However,
that didn't work. Instead we can fetch the image just by calling
image(image_id) and that should retrieve the image object so we can call
.info , etc.. on it.

View differences:

app/models/foreman_docker/docker.rb
61 61

  
62 62
    def tags(image_name)
63 63
      if exist?(image_name)
64
        tags_for_local_image(local_images(image_name).first)
64
        tags_for_local_image(image(image_name))
65 65
      else
66 66
        # If image is not found in the compute resource, get the tags from the Hub
67 67
        hub_api_url = "https://index.docker.io/v1/repositories/#{image_name}/tags"

Also available in: Unified diff