code: def push_image(self, image, insecure=False):
          
          logger.info("pushing image '%s'", image)
          logger.debug("image: '%s', insecure: '%s'", image, insecure)
          try:
              # push returns string composed of newline separated jsons; exactly what 'docker push'
              # outputs
              command_result = self.retry_generator(self.d.push,
                                                    image.to_str(tag=False),
                                                    tag=image.tag, insecure_registry=insecure,
                                                    decode=True, stream=True)
          except TypeError:
              # because changing api is fun
              command_result = self.retry_generator(self.d.push,
                                                    image.to_str(tag=False),
                                                    tag=image.tag, decode=True, stream=True)
  
          self.last_logs = command_result.logs
          return command_result.parsed_logs
docs: push provided image to registry
  
          :param image: ImageName
          :param insecure: bool, allow connecting to registry over plain http
          :return: str, logs from push