def check_image(image)
      tag = image_tag(image)

      # Check that a service exists for the image
      service = parsed_compose_file.dig "services", image
      unless service
        error = "The service \"#{image}\" is not present in the compose " \
          "file for this environment. Please add a service entry for " \
          "#{image} to #{compose_file_path}\n"
        puts Rainbow(error).fg :red

        puts <<~EOL
          It might look something like this:

          version: '3'
          services:
            #{image}:
              image: #{image_tag(image)}
        EOL
        exit 1
      end

      # Check that the image has the correct tag
      expected_tag = image_tag(image)
      actual_tag = service["image"]
      if actual_tag != expected_tag
        warning = "Expected the tag for the image \"#{image}\" to be " \
          "\"#{expected_tag}\", but it was \"#{actual_tag}\". While not " \
          "critical, this can cause issues with some commands."
        puts Rainbow(warning).fg :orange
      end
    end
def check_image(image)
      tag = image_tag(image)

      # Check that a service exists for the image
      service = parsed_compose_file.dig "services", image
      unless service
        error = "The service \"#{image}\" is not present in the compose " \
          "file for this environment. Please add a service entry for " \
          "#{image} to #{compose_file_path}\n"
        puts Rainbow(error).fg :red

        puts <<~EOL
          It might look something like this:

          version: '3'
          services:
            #{image}:
              image: #{image_tag(image)}
        EOL
        exit 1
      end

      # Check that the image has the correct tag
      expected_tag = image_tag(image)
      actual_tag = service["image"]
      if actual_tag != expected_tag
        warning = "Expected the tag for the image \"#{image}\" to be " \
          "\"#{expected_tag}\", but it was \"#{actual_tag}\". While not " \
          "critical, this can cause issues with some commands."
        puts Rainbow(warning).fg :orange
      end
    end
Confirms that there is an entry for the given image in the compose file
 for this environment, and that the image tag within is formatted as we
 expect it to be.

 Prints a warning if the tag has the wrong name, but errors out if the
 service tag is not present

 Expected names look like org/project-env-image:version