code: func (container *Container) UpdateContainer(hostConfig *containertypes.HostConfig) error {
  	resources := hostConfig.Resources
  	if resources.CPUShares != 0 ||
  		resources.Memory != 0 ||
  		resources.NanoCPUs != 0 ||
  		resources.CgroupParent != "" ||
  		resources.BlkioWeight != 0 ||
  		len(resources.BlkioWeightDevice) != 0 ||
  		len(resources.BlkioDeviceReadBps) != 0 ||
  		len(resources.BlkioDeviceWriteBps) != 0 ||
  		len(resources.BlkioDeviceReadIOps) != 0 ||
  		len(resources.BlkioDeviceWriteIOps) != 0 ||
  		resources.CPUPeriod != 0 ||
  		resources.CPUQuota != 0 ||
  		resources.CPURealtimePeriod != 0 ||
  		resources.CPURealtimeRuntime != 0 ||
  		resources.CpusetCpus != "" ||
  		resources.CpusetMems != "" ||
  		len(resources.Devices) != 0 ||
  		len(resources.DeviceCgroupRules) != 0 ||
  		resources.DiskQuota != 0 ||
  		resources.KernelMemory != 0 ||
  		resources.MemoryReservation != 0 ||
  		resources.MemorySwap != 0 ||
  		resources.MemorySwappiness != nil ||
  		resources.OomKillDisable != nil ||
  		(resources.PidsLimit != nil && *resources.PidsLimit != 0) ||
  		len(resources.Ulimits) != 0 ||
  		resources.CPUCount != 0 ||
  		resources.CPUPercent != 0 ||
  		resources.IOMaximumIOps != 0 ||
  		resources.IOMaximumBandwidth != 0 {
  		return fmt.Errorf("resource updating isn't supported on Windows")
  	}
  	// update HostConfig of container
  	if hostConfig.RestartPolicy.Name != "" {
  		if container.HostConfig.AutoRemove && !hostConfig.RestartPolicy.IsNone() {
  			return fmt.Errorf("Restart policy cannot be updated because AutoRemove is enabled for the container")
  		}
  		container.HostConfig.RestartPolicy = hostConfig.RestartPolicy
  	}
  	return nil
  }
docs: // UpdateContainer updates configuration of a container. Callers must hold a Lock on the Container.