Class TarImage


  • public class TarImage
    extends java.lang.Object
    Builds to a tarball archive.

    Usage example:

    
     TarImage tarImage = TarImage.at(Paths.get("image.tar"))
                                 .named("myimage");
     
    • Method Detail

      • at

        public static TarImage at​(java.nio.file.Path path)
        Constructs a TarImage with the specified path.
        Parameters:
        path - the path to the tarball archive
        Returns:
        a new TarImage
      • named

        public TarImage named​(ImageReference imageReference)
        Sets the name of the image. This is the name that shows up when the tar is loaded by the Docker daemon.
        Parameters:
        imageReference - the image reference
        Returns:
        this
      • named

        public TarImage named​(java.lang.String imageReference)
                       throws InvalidImageReferenceException
        Sets the name of the image. This is the name that shows up when the tar is loaded by the Docker daemon.
        Parameters:
        imageReference - the image reference
        Returns:
        this
        Throws:
        InvalidImageReferenceException - if imageReference is not a valid image reference