public class ReproducibleLayerBuilder
extends java.lang.Object
UnwrittenLayer from files. The reproducibility is implemented by
strips out all non-reproducible elements (modification time, group ID, user ID, user name, and
group name) from name-sorted tar archive entries.| Constructor and Description |
|---|
ReproducibleLayerBuilder() |
| Modifier and Type | Method and Description |
|---|---|
ReproducibleLayerBuilder |
addFiles(java.util.List<java.nio.file.Path> sourceFiles,
java.lang.String extractionPath)
Adds the
sourceFiles to be extracted on the image at extractionPath. |
UnwrittenLayer |
build()
Builds and returns the layer.
|
com.google.common.collect.ImmutableList<LayerEntry> |
getLayerEntries() |
public ReproducibleLayerBuilder addFiles(java.util.List<java.nio.file.Path> sourceFiles, java.lang.String extractionPath)
sourceFiles to be extracted on the image at extractionPath. The order
in which files are added matters.sourceFiles - the source files to build fromextractionPath - the Unix-style path to add the source files to in the container image
filesystempublic UnwrittenLayer build() throws java.io.IOException
java.io.IOException - if walking the source files failspublic com.google.common.collect.ImmutableList<LayerEntry> getLayerEntries()