/** * Sets the container entrypoint. * * @param entrypoint the entrypoint command * @return this * @see #setEntrypoint(List) */ public JibContainerBuilder setEntrypoint(String... entrypoint) { return setEntrypoint(Arrays.asList(entrypoint)); }
/** * Returns a new {@link JibContainerBuilder} using the parameters specified on the {@link * JavaContainerBuilder}. * * @return a new {@link JibContainerBuilder} using the parameters specified on the {@link * JavaContainerBuilder} */ public JibContainerBuilder toContainerBuilder() { if (mainClass == null) { throw new IllegalStateException( "mainClass is null on JavaContainerBuilder; specify the main class using " + "JavaContainerBuilder#setMainClass(String), or consider using a " + "jib.frontend.MainClassFinder to infer the main class"); } if (classpath.isEmpty()) { throw new IllegalStateException( "Failed to construct entrypoint because no files were added to the JavaContainerBuilder"); } jibContainerBuilder.setEntrypoint( JavaEntrypointConstructor.makeEntrypoint(new ArrayList<>(classpath), jvmFlags, mainClass)); jibContainerBuilder.setLayers(layerConfigurationsBuilder.build().getLayerConfigurations()); return jibContainerBuilder; }
/** * Sets the container entrypoint. * * @param entrypoint the entrypoint command * @return this * @see #setEntrypoint(List) */ public JibContainerBuilder setEntrypoint(String... entrypoint) { return setEntrypoint(Arrays.asList(entrypoint)); }
/** * Sets the container entrypoint. * * @param entrypoint the entrypoint command * @return this * @see #setEntrypoint(List) */ public JibContainerBuilder setEntrypoint(String... entrypoint) { return setEntrypoint(Arrays.asList(entrypoint)); }
/** * Returns a new {@link JibContainerBuilder} using the parameters specified on the {@link * JavaContainerBuilder}. * * @return a new {@link JibContainerBuilder} using the parameters specified on the {@link * JavaContainerBuilder} */ public JibContainerBuilder toContainerBuilder() { if (mainClass == null) { throw new IllegalStateException( "mainClass is null on JavaContainerBuilder; specify the main class using " + "JavaContainerBuilder#setMainClass(String), or consider using a " + "jib.frontend.MainClassFinder to infer the main class"); } if (classpath.isEmpty()) { throw new IllegalStateException( "Failed to construct entrypoint because no files were added to the JavaContainerBuilder"); } jibContainerBuilder.setEntrypoint( JavaEntrypointConstructor.makeEntrypoint(new ArrayList<>(classpath), jvmFlags, mainClass)); jibContainerBuilder.setLayers(layerConfigurationsBuilder.build().getLayerConfigurations()); return jibContainerBuilder; }
/** * Returns a new {@link JibContainerBuilder} using the parameters specified on the {@link * JavaContainerBuilder}. * * @return a new {@link JibContainerBuilder} using the parameters specified on the {@link * JavaContainerBuilder} */ public JibContainerBuilder toContainerBuilder() { if (mainClass == null) { throw new IllegalStateException( "mainClass is null on JavaContainerBuilder; specify the main class using " + "JavaContainerBuilder#setMainClass(String), or consider using a " + "jib.frontend.MainClassFinder to infer the main class"); } if (classpath.isEmpty()) { throw new IllegalStateException( "Failed to construct entrypoint because no files were added to the JavaContainerBuilder"); } jibContainerBuilder.setEntrypoint( JavaEntrypointConstructor.makeEntrypoint(new ArrayList<>(classpath), jvmFlags, mainClass)); jibContainerBuilder.setLayers(layerConfigurationsBuilder.build().getLayerConfigurations()); return jibContainerBuilder; }
final List<String> newEntrypoint = entryPoint.stream().map(it -> replaceEntrypointPlaceholders(it, cp)).collect(toList()); builder.setEntrypoint(newEntrypoint); if (getLog().isDebugEnabled()) { getLog().debug("Entrypoint set to " + newEntrypoint);
Jib.from(baseImage) .setLayers(projectProperties.getJavaLayerConfigurations().getLayerConfigurations()) .setEntrypoint(computeEntrypoint(rawConfiguration, projectProperties)) .setProgramArguments(rawConfiguration.getProgramArguments().orElse(null)) .setEnvironment(rawConfiguration.getEnvironment())
Jib.from(baseImage) .setLayers(projectProperties.getJavaLayerConfigurations().getLayerConfigurations()) .setEntrypoint(computeEntrypoint(rawConfiguration, projectProperties)) .setProgramArguments(rawConfiguration.getProgramArguments().orElse(null)) .setEnvironment(rawConfiguration.getEnvironment())