| Constructor and Description |
|---|
Builder() |
| Modifier and Type | Method and Description |
|---|---|
Image.Builder<T> |
addEnvironment(Map<String,String> environment)
Adds a map of environment variables to the current map.
|
Image.Builder<T> |
addEnvironmentVariable(String name,
String value)
Adds an environment variable with a given name and value.
|
Image.Builder<T> |
addHistory(HistoryEntry history)
Adds a history element to the image.
|
Image.Builder<T> |
addLabel(String name,
String value)
Adds an item to the "Labels" field in the container configuration.
|
Image.Builder<T> |
addLabels(Map<String,String> labels)
Adds items to the "Labels" field in the container configuration.
|
Image.Builder<T> |
addLayer(T layer)
Adds a layer to the image.
|
Image<T> |
build() |
Image.Builder<T> |
setCreated(Instant created)
Sets the image creation time.
|
Image.Builder<T> |
setEntrypoint(List<String> entrypoint)
Sets the entrypoint of the image.
|
Image.Builder<T> |
setExposedPorts(List<Port> exposedPorts)
Sets the items in the "ExposedPorts" field in the container configuration.
|
Image.Builder<T> |
setProgramArguments(List<String> programArguments)
Sets the items in the "Cmd" field in the container configuration.
|
Image.Builder<T> |
setUser(String user)
Sets the user/group to run the container as.
|
Image.Builder<T> |
setWorkingDirectory(String workingDirectory)
Sets the item in the "WorkingDir" field in the container configuration.
|
public Image.Builder<T> setCreated(Instant created)
created - the creation timepublic Image.Builder<T> addEnvironment(@Nullable Map<String,String> environment)
environment - the map of environment variablespublic Image.Builder<T> addEnvironmentVariable(String name, String value)
name - the name of the variablevalue - the value to set it topublic Image.Builder<T> setEntrypoint(@Nullable List<String> entrypoint)
entrypoint - the list of entrypoint tokenspublic Image.Builder<T> setUser(@Nullable String user)
user - the username/UID and optionally the groupname/GIDpublic Image.Builder<T> setProgramArguments(@Nullable List<String> programArguments)
programArguments - the list of arguments to append to the image entrypointpublic Image.Builder<T> setExposedPorts(@Nullable List<Port> exposedPorts)
exposedPorts - the list of exposed ports to addpublic Image.Builder<T> addLabels(@Nullable Map<String,String> labels)
labels - the map of labels to addpublic Image.Builder<T> addLabel(String name, String value)
name - the name of the labelvalue - the value of the labelpublic Image.Builder<T> setWorkingDirectory(@Nullable String workingDirectory)
workingDirectory - the working directorypublic Image.Builder<T> addLayer(T layer) throws LayerPropertyNotFoundException
layer - the layer to addLayerPropertyNotFoundException - if adding the layer failspublic Image.Builder<T> addHistory(HistoryEntry history)
history - the history object to addCopyright © 2018. All rights reserved.