def image(img = nil)
      return @image if img.nil?
      ImageGC.instance.add(img.id) if @options[:rm]
      @image = img
    end
def image(img = nil)
      return @image if img.nil?
      ImageGC.instance.add(img.id) if @options[:rm]
      @image = img
    end
Sets or gets the Docker image.

 @param img [Docker::Image] The Docker image to set.

 @return [Docker::Image] The Docker image object.

 @api private