Package org.openrewrite.docker.internal
Class ImageReferences
java.lang.Object
org.openrewrite.docker.internal.ImageReferences
Splits a parsed image reference (the
name:tag@digest form used by FROM and by
the --from flag of COPY/ADD) into its component Docker.Arguments.
Shared by the parser and the trait layer to keep a single source of truth.-
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable Docker.Argument[]split(List<Docker.ArgumentContent> contents, Space prefix) Splits image reference contents into{imageName, tag, digest}, withtaganddigestnull when absent.
-
Method Details
-
split
public static @Nullable Docker.Argument[] split(List<Docker.ArgumentContent> contents, Space prefix) Splits image reference contents into{imageName, tag, digest}, withtaganddigestnull when absent. A single quoted string is kept intact as the image name.
-