code: public static Container start(final DockerConfig config, final boolean stopOthers) throws Exception {
          Preconditions.checkArgument(config != null, "config must be non-null");
  
          if (stopOthers) {
              getRegisteredContainers().stream() //
                      .filter(container -> {
                          return container.isStarted() //
                                  && container.getRefCount() == 0 //
                                  && !StringUtils.equals(config.getName(), container.getConfig().getName());
                      }) //
                      .forEach(container -> container.stop());
          }
  
          final Container container = register(config);
          container.start();
          return container;
      }
docs: Starts a docker container with the given configuration.
  
  This method is particularly useful when you want to start a container dynamically.
  
  @param config
  container configuration
  @param stopOthers
  true to stop other running containers; useful to limit the amount of memory that a
  series of unit tests will consume.
  @return a {@link Container} representing the started container.
  @throws Exception
  if the container cannot be started