code: func (daemon *Daemon) ContainerStop(name string, timeout *int) error {
  	container, err := daemon.GetContainer(name)
  	if err != nil {
  		return err
  	}
  	if !container.IsRunning() {
  		return containerNotModifiedError{running: false}
  	}
  	if timeout == nil {
  		stopTimeout := container.StopTimeout()
  		timeout = &stopTimeout
  	}
  	if err := daemon.containerStop(container, *timeout); err != nil {
  		return errdefs.System(errors.Wrapf(err, "cannot stop container: %s", name))
  	}
  	return nil
  }
docs: // ContainerStop looks for the given container and stops it.
  // In case the container fails to stop gracefully within a time duration
  // specified by the timeout argument, in seconds, it is forcefully
  // terminated (killed).
  //
  // If the timeout is nil, the container's StopTimeout value is used, if set,
  // otherwise the engine default. A negative timeout value can be specified,
  // meaning no timeout, i.e. no forceful termination is performed.