Class ImageReferences

java.lang.Object
org.openrewrite.docker.internal.ImageReferences

public final class ImageReferences extends Object
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 Details

    • split

      public static @Nullable Docker.Argument[] split(List<Docker.ArgumentContent> contents, Space prefix)
      Splits image reference contents into {imageName, tag, digest}, with tag and digest null when absent. A single quoted string is kept intact as the image name.