Package com.google.cloud.tools.jib.api
Class TarImage
- java.lang.Object
-
- com.google.cloud.tools.jib.api.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static TarImage
at(java.nio.file.Path path)
Constructs aTarImage
with the specified path.TarImage
named(ImageReference imageReference)
Sets the name of the image.TarImage
named(java.lang.String imageReference)
Sets the name of the image.
-
-
-
Method Detail
-
at
public static TarImage at(java.nio.file.Path path)
Constructs aTarImage
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
- ifimageReference
is not a valid image reference
-
-