Class HostConfig.Builder
java.lang.Object
com.spotify.docker.client.messages.HostConfig.Builder
- Direct Known Subclasses:
AutoValue_HostConfig.Builder
- Enclosing class:
HostConfig
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappendBinds
(HostConfig.Bind... binds) Append binds to the existing list in this builder.appendBinds
(Iterable<String> newBinds) Append binds to the existing list in this builder.appendBinds
(String... binds) Append binds to the existing list in this builder.(package private) abstract HostConfig
abstract HostConfig.Builder
autoRemove
(Boolean autoRemove) Only works for Docker API version >= 1.25.(package private) abstract com.google.common.collect.ImmutableList
<String> binds()
binds
(HostConfig.Bind... binds) Set the list of binds to the parameter, replacing any existing value.abstract HostConfig.Builder
Set the list of binds to the parameter, replacing any existing value.abstract HostConfig.Builder
Set the list of binds to the parameter, replacing any existing value.abstract HostConfig.Builder
blkioDeviceReadBps
(List<HostConfig.BlkioDeviceRate> blkioDeviceReadBps) abstract HostConfig.Builder
blkioDeviceReadIOps
(List<HostConfig.BlkioDeviceRate> blkioDeviceReadIOps) abstract HostConfig.Builder
blkioDeviceWriteBps
(List<HostConfig.BlkioDeviceRate> blkioDeviceWriteBps) abstract HostConfig.Builder
blkioDeviceWriteIOps
(List<HostConfig.BlkioDeviceRate> blkioDeviceWriteIOps) abstract HostConfig.Builder
blkioWeight
(Integer blkioWeight) abstract HostConfig.Builder
blkioWeightDevice
(List<HostConfig.BlkioWeightDevice> blkioWeightDevice) build()
abstract HostConfig.Builder
abstract HostConfig.Builder
abstract HostConfig.Builder
abstract HostConfig.Builder
abstract HostConfig.Builder
cgroupParent
(String cgroupParent) abstract HostConfig.Builder
containerIdFile
(String containerIdFile) containerPidMode
(String container) Set the PID (Process) Namespace mode for the container.private static <T> com.google.common.collect.ImmutableList
<T> copyWithoutDuplicates
(List<T> input) abstract HostConfig.Builder
abstract HostConfig.Builder
abstract HostConfig.Builder
cpusetCpus
(String cpusetCpus) abstract HostConfig.Builder
cpusetMems
(String cpusetMems) abstract HostConfig.Builder
abstract HostConfig.Builder
abstract HostConfig.Builder
abstract HostConfig.Builder
abstract HostConfig.Builder
abstract HostConfig.Builder
dnsOptions
(String... dnsOptions) abstract HostConfig.Builder
dnsOptions
(List<String> dnsOptions) abstract HostConfig.Builder
abstract HostConfig.Builder
abstract HostConfig.Builder
extraHosts
(String... extraHosts) abstract HostConfig.Builder
extraHosts
(List<String> extraHosts) Set the PID (Process) Namespace mode for the container.abstract HostConfig.Builder
abstract HostConfig.Builder
abstract HostConfig.Builder
abstract HostConfig.Builder
abstract HostConfig.Builder
lxcConf
(HostConfig.LxcConfParameter... lxcConf) abstract HostConfig.Builder
lxcConf
(List<HostConfig.LxcConfParameter> lxcConf) abstract HostConfig.Builder
abstract HostConfig.Builder
memoryReservation
(Long memoryReservation) abstract HostConfig.Builder
memorySwap
(Long memorySwap) abstract HostConfig.Builder
memorySwappiness
(Integer memorySwappiness) abstract HostConfig.Builder
abstract HostConfig.Builder
networkMode
(String networkMode) abstract HostConfig.Builder
oomKillDisable
(Boolean oomKillDisable) abstract HostConfig.Builder
oomScoreAdj
(Integer oomScoreAdj) abstract HostConfig.Builder
abstract HostConfig.Builder
abstract HostConfig.Builder
portBindings
(Map<String, List<PortBinding>> portBindings) abstract HostConfig.Builder
privileged
(Boolean privileged) abstract HostConfig.Builder
publishAllPorts
(Boolean publishAllPorts) abstract HostConfig.Builder
readonlyRootfs
(Boolean readonlyRootfs) abstract HostConfig.Builder
restartPolicy
(HostConfig.RestartPolicy restartPolicy) abstract HostConfig.Builder
securityOpt
(String... securityOpt) abstract HostConfig.Builder
securityOpt
(List<String> securityOpt) abstract HostConfig.Builder
abstract HostConfig.Builder
storageOpt
(Map<String, String> tmpfs) abstract HostConfig.Builder
toStringList
(HostConfig.Bind[] binds) abstract HostConfig.Builder
ulimits
(List<HostConfig.Ulimit> ulimits) abstract HostConfig.Builder
volumesFrom
(String... volumesFrom) abstract HostConfig.Builder
volumesFrom
(List<String> volumesFrom)
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
binds
Set the list of binds to the parameter, replacing any existing value.To append to the list instead, use one of the appendBinds() methods.
- Parameters:
binds
- A list of volume bindings for this container. Each volume binding is a string.- Returns:
HostConfig.Builder
-
binds
Set the list of binds to the parameter, replacing any existing value.To append to the list instead, use one of the appendBinds() methods.
- Parameters:
binds
- An array of volume bindings for this container. Each volume binding is a string.- Returns:
HostConfig.Builder
-
binds
Set the list of binds to the parameter, replacing any existing value.To append to the list instead, use one of the appendBinds() methods.
- Parameters:
binds
- An array of volume bindings for this container. Each volume binding is aHostConfig.Bind
object.- Returns:
HostConfig.Builder
-
binds
-
toStringList
-
appendBinds
Append binds to the existing list in this builder. Duplicates are discarded.- Parameters:
newBinds
- An iterable of volume bindings for this container. Each volume binding is a String.- Returns:
HostConfig.Builder
-
appendBinds
Append binds to the existing list in this builder.- Parameters:
binds
- An array of volume bindings for this container. Each volume binding is aHostConfig.Bind
object.- Returns:
HostConfig.Builder
-
appendBinds
Append binds to the existing list in this builder.- Parameters:
binds
- An array of volume bindings for this container. Each volume binding is a String.- Returns:
HostConfig.Builder
-
copyWithoutDuplicates
-
blkioWeight
-
blkioWeightDevice
public abstract HostConfig.Builder blkioWeightDevice(List<HostConfig.BlkioWeightDevice> blkioWeightDevice) -
blkioDeviceReadBps
public abstract HostConfig.Builder blkioDeviceReadBps(List<HostConfig.BlkioDeviceRate> blkioDeviceReadBps) -
blkioDeviceWriteBps
public abstract HostConfig.Builder blkioDeviceWriteBps(List<HostConfig.BlkioDeviceRate> blkioDeviceWriteBps) -
blkioDeviceReadIOps
public abstract HostConfig.Builder blkioDeviceReadIOps(List<HostConfig.BlkioDeviceRate> blkioDeviceReadIOps) -
blkioDeviceWriteIOps
public abstract HostConfig.Builder blkioDeviceWriteIOps(List<HostConfig.BlkioDeviceRate> blkioDeviceWriteIOps) -
containerIdFile
-
lxcConf
-
lxcConf
-
privileged
-
portBindings
-
links
-
links
-
publishAllPorts
-
dns
-
dns
-
dnsOptions
-
dnsOptions
-
dnsSearch
-
dnsSearch
-
extraHosts
-
extraHosts
-
volumesFrom
-
volumesFrom
-
capAdd
-
capAdd
-
capDrop
-
capDrop
-
networkMode
-
securityOpt
-
securityOpt
-
devices
-
devices
-
memory
-
memorySwap
-
memorySwappiness
-
memoryReservation
-
nanoCpus
-
cpuPeriod
-
cpusetCpus
-
cpusetMems
-
cpuQuota
-
cgroupParent
-
restartPolicy
-
logConfig
-
ipcMode
-
ulimits
-
pidMode
-
containerPidMode
Set the PID (Process) Namespace mode for the container. Use this method to join another container's PID namespace. To use the host PID namespace, usehostPidMode()
.- Parameters:
container
- Join the namespace of this container (Name or ID)- Returns:
- Builder
-
hostPidMode
Set the PID (Process) Namespace mode for the container. Use this method to use the host's PID namespace. To use another container's PID namespace, usecontainerPidMode(String)
.- Returns:
HostConfig.Builder
-
shmSize
-
oomKillDisable
-
oomScoreAdj
-
autoRemove
Only works for Docker API version >= 1.25.- Parameters:
autoRemove
- Whether to automatically remove the container when it exits- Returns:
HostConfig.Builder
-
pidsLimit
-
tmpfs
-
readonlyRootfs
-
storageOpt
-
autoBuild
-
build
-