code: public void stop() {
          synchronized (this.startStopMonitor) {
              doStop();
  
              // If we registered a JVM shutdown hook, we don't need it anymore now:
              // We've already explicitly closed the context.
              if (this.shutdownHook != null) {
                  try {
                      Runtime.getRuntime().removeShutdownHook(this.shutdownHook);
                  } catch (final IllegalStateException ex) {
                      // ignore - VM is already shutting down
                  }
              }
          }
      }
docs: Instructs Docker to stop the container