Package com.google.cloud.tools.jib.image
Class ImageTarball
- java.lang.Object
-
- com.google.cloud.tools.jib.image.ImageTarball
-
public class ImageTarball extends java.lang.Object
Translates anImage
to a tarball that can be loaded into Docker.
-
-
Constructor Summary
Constructors Constructor Description ImageTarball(Image image, ImageReference imageReference, com.google.common.collect.ImmutableSet<java.lang.String> allTargetImageTags)
Instantiate with anImage
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getTotalLayerSize()
Returns the total size of the image's layers in bytes.void
writeTo(java.io.OutputStream out)
Writes image tar bar in configuredImage.getImageFormat()
of OCI or Docker to output stream.
-
-
-
Constructor Detail
-
ImageTarball
public ImageTarball(Image image, ImageReference imageReference, com.google.common.collect.ImmutableSet<java.lang.String> allTargetImageTags)
Instantiate with anImage
.- Parameters:
image
- the image to convert into a tarballimageReference
- image reference to set in the manifest (note that the tag portion of the image reference is ignored)allTargetImageTags
- the tags to tag the image with
-
-
Method Detail
-
writeTo
public void writeTo(java.io.OutputStream out) throws java.io.IOException
Writes image tar bar in configuredImage.getImageFormat()
of OCI or Docker to output stream.- Parameters:
out
- the target output stream- Throws:
java.io.IOException
- if an error occurs writing out the image to stream
-
getTotalLayerSize
public long getTotalLayerSize()
Returns the total size of the image's layers in bytes.- Returns:
- the total size of the image's layers in bytes
-
-