/** * Instantiate with the image reference to tag the built image with. This is the name that shows * up on the Docker daemon. * * @param imageReference the image reference * @return a new {@link DockerDaemonImage} * @throws InvalidImageReferenceException if {@code imageReference} is not a valid image reference */ public static DockerDaemonImage named(String imageReference) throws InvalidImageReferenceException { return named(ImageReference.parse(imageReference)); }
/** * Instantiate with the image reference to tag the built image with. This is the name that shows * up on the Docker daemon. * * @param imageReference the image reference * @return a new {@link DockerDaemonImage} * @throws InvalidImageReferenceException if {@code imageReference} is not a valid image reference */ public static DockerDaemonImage named(String imageReference) throws InvalidImageReferenceException { return named(ImageReference.parse(imageReference)); }
/** * Instantiate with the image reference to tag the built image with. This is the name that shows * up on the Docker daemon. * * @param imageReference the image reference * @return a new {@link DockerDaemonImage} * @throws InvalidImageReferenceException if {@code imageReference} is not a valid image reference */ public static DockerDaemonImage named(String imageReference) throws InvalidImageReferenceException { return named(ImageReference.parse(imageReference)); }
private void toLocalDocker(final ExecutorService executor, final JibContainerBuilder builder, final String tag, final String imageName) throws InvalidImageReferenceException, InterruptedException, ExecutionException, IOException, CacheDirectoryCreationException { final DockerDaemonImage docker = DockerDaemonImage.named(imageName); if (dockerEnvironment != null) { docker.setDockerEnvironment(dockerEnvironment); } if (dockerExecutable != null) { docker.setDockerExecutable(dockerExecutable.toPath()); } builder.containerize(configureContainer(Containerizer.to(docker), executor)); getLog().info("Built local image='" + imageName + "', tag='" + tag + "'"); }
public static PluginConfigurationProcessor processCommonConfigurationForDockerDaemonImage( RawConfiguration rawConfiguration, InferredAuthProvider inferredAuthProvider, ProjectProperties projectProperties, @Nullable Path dockerExecutable, @Nullable Map<String, String> dockerEnvironment, HelpfulSuggestions helpfulSuggestions) throws InvalidImageReferenceException, MainClassInferenceException, InvalidAppRootException, InferredAuthRetrievalException, IOException, InvalidWorkingDirectoryException, InvalidContainerVolumeException { ImageReference targetImageReference = getGeneratedTargetDockerTag(rawConfiguration, projectProperties, helpfulSuggestions); DockerDaemonImage targetImage = DockerDaemonImage.named(targetImageReference); if (dockerExecutable != null) { targetImage.setDockerExecutable(dockerExecutable); } if (dockerEnvironment != null) { targetImage.setDockerEnvironment(dockerEnvironment); } Containerizer containerizer = Containerizer.to(targetImage); return processCommonConfiguration( rawConfiguration, inferredAuthProvider, projectProperties, containerizer, targetImageReference, false); }
public static PluginConfigurationProcessor processCommonConfigurationForDockerDaemonImage( RawConfiguration rawConfiguration, InferredAuthProvider inferredAuthProvider, ProjectProperties projectProperties, @Nullable Path dockerExecutable, @Nullable Map<String, String> dockerEnvironment, HelpfulSuggestions helpfulSuggestions) throws InvalidImageReferenceException, MainClassInferenceException, InvalidAppRootException, InferredAuthRetrievalException, IOException, InvalidWorkingDirectoryException, InvalidContainerVolumeException { ImageReference targetImageReference = getGeneratedTargetDockerTag(rawConfiguration, projectProperties, helpfulSuggestions); DockerDaemonImage targetImage = DockerDaemonImage.named(targetImageReference); if (dockerExecutable != null) { targetImage.setDockerExecutable(dockerExecutable); } if (dockerEnvironment != null) { targetImage.setDockerEnvironment(dockerEnvironment); } Containerizer containerizer = Containerizer.to(targetImage); return processCommonConfiguration( rawConfiguration, inferredAuthProvider, projectProperties, containerizer, targetImageReference, false); }