public void launchDockerContainer() throws Exception {
        runCmdAndPrintStreams(buildRmCmd(), 600);
        if (runCmdAndPrintStreams(buildRunCmd(), 600).rc != 0) {
          printDockerEvents();
          throw new RuntimeException("Unable to start docker container");
        }
        long startTime = System.currentTimeMillis();
        ProcessResults pr;
        do {
            Thread.sleep(1000);
            pr = runCmdAndPrintStreams(buildLogCmd(), 30);
            if (pr.rc != 0) {
              printDockerEvents();
              throw new RuntimeException("Failed to get docker logs");
            }
        } while (startTime + MAX_STARTUP_WAIT >= System.currentTimeMillis() && !isContainerReady(pr));
        if (startTime + MAX_STARTUP_WAIT < System.currentTimeMillis()) {
          printDockerEvents();
          throw new RuntimeException(
              String.format("Container initialization failed within %d seconds. Please check the hive logs.",
                  MAX_STARTUP_WAIT / 1000));
        }
      }
The class is in charge of connecting and populating dockerized databases for qtest.

The database should have at least one root user (admin/superuser) able to modify every aspect of the system. The user
either exists by default when the database starts or must created right after startup.
itests/util/src/main/java/org/apache/hadoop/hive/ql/externalDB/AbstractExternalDB.java