public static class JavaLayerConfigurations.Builder extends Object
public JavaLayerConfigurations.Builder addFile(JavaLayerConfigurations.LayerType layerType, Path sourceFile, AbsoluteUnixPath pathInContainer)
LayerConfiguration.Builder#addEntry for concrete examples about
how the file will be placed in the image.layerType - the layer to add files intosourceFile - the source file to add to the layerpathInContainer - the path in the container file system corresponding to the sourceFileLayerConfiguration.Builder#addEntry(Path, AbsoluteUnixPath)public JavaLayerConfigurations.Builder addFile(JavaLayerConfigurations.LayerType layerType, Path sourceFile, AbsoluteUnixPath pathInContainer, @Nullable FilePermissions permissions)
LayerConfiguration.Builder#addEntry for concrete examples about
how the file will be placed in the image.layerType - the layer to add files intosourceFile - the source file to add to the layerpathInContainer - the path in the container file system corresponding to the sourceFilepermissions - the file permissions on the container. Use null for defaults (644
for files, 755 for directories)LayerConfiguration.Builder#addEntry(Path, AbsoluteUnixPath, FilePermissions)public JavaLayerConfigurations.Builder addDirectoryContents(JavaLayerConfigurations.LayerType layerType, Path sourceRoot, Predicate<Path> pathFilter, AbsoluteUnixPath basePathInContainer) throws IOException
pathFilter) and recursively.
sourceRoot must be a directory. Empty directories will always be added regardless of
pathFilter, except that sourceRoot is never added.
The contents of sourceRoot will be placed into basePathInContainer. For
example, if sourceRoot is /usr/home, /usr/home/passwd exists locally,
and basePathInContainer is /etc, then the image will have /etc/passwd.
layerType - the layer to add files intosourceRoot - root directory whose contents will be addedpathFilter - filter that determines which files (not directories) should be addedbasePathInContainer - directory in the layer into which the source contents are addedIOException - error while listing directoriesNotDirectoryException - if sourceRoot is not a directorypublic JavaLayerConfigurations.Builder addDirectoryContents(JavaLayerConfigurations.LayerType layerType, Path sourceRoot, Predicate<Path> pathFilter, AbsoluteUnixPath basePathInContainer, Map<AbsoluteUnixPath,FilePermissions> permissionsMap) throws IOException
pathFilter) and recursively.
sourceRoot must be a directory. Empty directories will always be added regardless of
pathFilter, except that sourceRoot is never added. Permissions are specified
via permissionsMap, which maps from extraction path on the container to file
permissions.layerType - the layer to add files intosourceRoot - root directory whose contents will be addedpathFilter - filter that determines which files (not directories) should be addedbasePathInContainer - directory in the layer into which the source contents are addedpermissionsMap - the map from absolute path on container to file permissionIOException - error while listing directoriesNotDirectoryException - if sourceRoot is not a directorypublic JavaLayerConfigurations build()
Copyright © 2018. All rights reserved.