code: func (s *Service) Scale(ctx context.Context, scale int, timeout int) error {
  	if s.specificiesHostPort() {
  		logrus.Warnf("The \"%s\" service specifies a port on the host. If multiple containers for this service are created on a single host, the port will clash.", s.Name())
  	}
  
  	containers, err := s.collectContainers(ctx)
  	if err != nil {
  		return err
  	}
  	if len(containers) > scale {
  		foundCount := 0
  		for _, c := range containers {
  			foundCount++
  			if foundCount > scale {
  				timeout = s.stopTimeout(timeout)
  				if err := c.Stop(ctx, timeout); err != nil {
  					return err
  				}
  				// FIXME(vdemeester) remove volume in scale by default ?
  				if err := c.Remove(ctx, false); err != nil {
  					return err
  				}
  			}
  		}
  	}
  
  	if err != nil {
  		return err
  	}
  
  	if len(containers) < scale {
  		err := s.ensureImageExists(ctx, false, false)
  		if err != nil {
  			return err
  		}
  
  		if _, err = s.constructContainers(ctx, scale); err != nil {
  			return err
  		}
  	}
  
  	return s.up(ctx, "", false, options.Up{})
  }
docs: // Scale implements Service.Scale. It creates or removes containers to have the specified number
  // of related container to the service to run.