public static class ContainerConfiguration.Builder extends Object
ContainerConfiguration.| Modifier and Type | Method and Description |
|---|---|
void |
addEnvironment(String name,
String value) |
void |
addExposedPort(Port port) |
void |
addLabel(String key,
String value) |
ContainerConfiguration |
build()
Builds the
ContainerConfiguration. |
ContainerConfiguration.Builder |
setCreationTime(Instant creationTime)
Sets the image creation time.
|
ContainerConfiguration.Builder |
setEntrypoint(List<String> entrypoint)
Sets the container entrypoint.
|
ContainerConfiguration.Builder |
setEnvironment(Map<String,String> environmentMap)
Sets the container's environment variables, mapping variable name to value.
|
ContainerConfiguration.Builder |
setExposedPorts(List<Port> exposedPorts)
Sets the container's exposed ports.
|
ContainerConfiguration.Builder |
setLabels(Map<String,String> labels)
Sets the container's labels.
|
ContainerConfiguration.Builder |
setProgramArguments(List<String> programArguments)
Sets the commandline arguments for main.
|
ContainerConfiguration.Builder |
setUser(String user)
Sets the user and group to run the container as.
|
public ContainerConfiguration.Builder setCreationTime(Instant creationTime)
creationTime - the creation timepublic ContainerConfiguration.Builder setProgramArguments(@Nullable List<String> programArguments)
programArguments - the list of argumentspublic ContainerConfiguration.Builder setEnvironment(@Nullable Map<String,String> environmentMap)
environmentMap - the mappublic ContainerConfiguration.Builder setExposedPorts(@Nullable List<Port> exposedPorts)
exposedPorts - the list of portspublic void addExposedPort(Port port)
public ContainerConfiguration.Builder setLabels(@Nullable Map<String,String> labels)
labels - the map of labelspublic ContainerConfiguration.Builder setEntrypoint(@Nullable List<String> entrypoint)
entrypoint - the tokenized command to run when the container startspublic ContainerConfiguration.Builder setUser(@Nullable String user)
user can be a username or UID along
with an optional groupname or GID. The following are all valid: user, uid,
user:group, uid:gid, uid:group, user:gid.user - the username/UID and optionally the groupname/GIDpublic ContainerConfiguration build()
ContainerConfiguration.ContainerConfigurationCopyright © 2018. All rights reserved.