private static void assertDockerInspectParameters(String imageReference)
      throws IOException, InterruptedException {
    String dockerInspectExposedPorts =
        new Command("docker", "inspect", "-f", "'{{json .Config.ExposedPorts}}'", imageReference)
            .run();
    String dockerInspectLabels =
        new Command("docker", "inspect", "-f", "'{{json .Config.Labels}}'", imageReference).run();
    String history = new Command("docker", "history", imageReference).run();

    MatcherAssert.assertThat(
        dockerInspectExposedPorts,
        CoreMatchers.containsString(
            "\"1000/tcp\":{},\"2000/udp\":{},\"2001/udp\":{},\"2002/udp\":{},\"2003/udp\":{}"));
    MatcherAssert.assertThat(
        dockerInspectLabels,
        CoreMatchers.containsString("\"key1\":\"value1\",\"key2\":\"value2\""));
    assertThat(history).contains("jib-maven-plugin");
  }
Pulls a built image and attempts to run it. Also verifies the container configuration and
history of the built image.

@param imageReference the image reference of the built image
@return the container output
@throws IOException if an I/O exception occurs
@throws InterruptedException if the process was interrupted
jib-maven-plugin/src/integration-test/java/com/google/cloud/tools/jib/maven/BuildImageMojoIntegrationTest.java