@Override
  public void execute() throws MojoExecutionException {

    if (skipDocker) {
      getLog().info("Skipping docker goal");
      return;
    }

    try (DockerClient client = buildDockerClient()) {
      execute(client);
    } catch (Exception e) {
      throw new MojoExecutionException("Exception caught", e);
    }
  }
Flag to skip docker push, making push goal a no-op. This can be useful when docker:push
is bound to deploy goal, and you want to deploy a jar but not a container. Defaults to false.
src/main/java/com/spotify/docker/AbstractDockerMojo.java