@Nullable
  private ImmutableList<String> computeEntrypoint(
      Image baseImage, ContainerConfiguration containerConfiguration) {
    boolean shouldInherit =
        baseImage.getEntrypoint() != null && containerConfiguration.getEntrypoint() == null;

    ImmutableList<String> entrypointToUse =
        shouldInherit ? baseImage.getEntrypoint() : containerConfiguration.getEntrypoint();

    if (entrypointToUse != null) {
      buildContext.getEventHandlers().dispatch(LogEvent.lifecycle(""));
      if (shouldInherit) {
        String message =
            "Container entrypoint set to " + entrypointToUse + " (inherited from base image)";
        buildContext.getEventHandlers().dispatch(LogEvent.lifecycle(message));
      } else {
        String message = "Container entrypoint set to " + truncateLongClasspath(entrypointToUse);
        buildContext.getEventHandlers().dispatch(LogEvent.lifecycle(message));
      }
    }

    return entrypointToUse;
  }
Computes the image entrypoint. If {@link ContainerConfiguration#getEntrypoint()} is null, the
entrypoint is inherited from the base image. Otherwise {@link
ContainerConfiguration#getEntrypoint()} is returned.

@param baseImage the base image
@param containerConfiguration the container configuration
@return the container entrypoint
jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/BuildImageStep.java