java.lang.Object
org.springframework.boot.buildpack.platform.docker.type.ImageArchive
All Implemented Interfaces:
TarArchive

public class ImageArchive extends Object implements TarArchive
An image archive that can be loaded into Docker.
Since:
2.3.0
Author:
Phillip Webb, Scott Frederick
See Also:
  • Method Details

    • getImageConfig

      public ImageConfig getImageConfig()
      Return the image config for the archive.
      Returns:
      the image config
    • getCreateDate

      public Instant getCreateDate()
      Return the create data of the archive.
      Returns:
      the create date
    • getTag

      public ImageReference getTag()
      Return the tag of the archive.
      Returns:
      the tag
    • writeTo

      public void writeTo(OutputStream outputStream) throws IOException
      Description copied from interface: TarArchive
      Write the TAR archive to the given output stream.
      Specified by:
      writeTo in interface TarArchive
      Parameters:
      outputStream - the output stream to write to
      Throws:
      IOException - on IO error
    • from

      public static ImageArchive from(Image image) throws IOException
      Create a new ImageArchive based on an existing Image.
      Parameters:
      image - the image that this archive is based on
      Returns:
      the new image archive.
      Throws:
      IOException - on IO error
    • from

      public static ImageArchive from(Image image, IOConsumer<ImageArchive.Update> update) throws IOException
      Create a new ImageArchive based on an existing Image.
      Parameters:
      image - the image that this archive is based on
      update - consumer to apply updates
      Returns:
      the new image archive.
      Throws:
      IOException - on IO error