Interface HostConfig.Builder
- Enclosing interface:
- HostConfig
public static interface HostConfig.Builder
-
Method Summary
Modifier and TypeMethodDescriptionautoRemove(Boolean autoRemove) Only works for Docker API version >= 1.25.default HostConfig.Builderbinds(HostConfig.Bind... binds) blkioDeviceReadBps(Iterable<? extends HostConfig.BlkioDeviceRate> blkioDeviceReadBps) blkioDeviceReadIOps(Iterable<? extends HostConfig.BlkioDeviceRate> blkioDeviceReadIOps) blkioDeviceWriteBps(Iterable<? extends HostConfig.BlkioDeviceRate> blkioDeviceWriteBps) blkioDeviceWriteIOps(Iterable<? extends HostConfig.BlkioDeviceRate> blkioDeviceWriteIOps) blkioWeight(Integer blkioWeight) blkioWeightDevice(Iterable<? extends HostConfig.BlkioWeightDevice> blkioWeightDevice) build()cgroupParent(String cgroupParent) containerIdFile(String containerIdFile) default HostConfig.BuildercontainerPidMode(String container) Set the PID (Process) Namespace mode for the container.cpusetCpus(String cpusetCpus) cpusetMems(String cpusetMems) deviceRequests(Iterable<? extends HostConfig.DeviceRequest> deviceRequests) dnsOptions(Iterable<String> dnsOptions) dnsOptions(String... dnsOptions) extraHosts(Iterable<String> extraHosts) extraHosts(String... extraHosts) default HostConfig.BuilderSet the PID (Process) Namespace mode for the container.kernelMemory(Long kernelMemory) Deprecated.lxcConf(Iterable<? extends HostConfig.LxcConfParameter> lxcConf) lxcConf(HostConfig.LxcConfParameter... lxcConf) memoryReservation(Long memoryReservation) memorySwap(Long memorySwap) memorySwappiness(Integer memorySwappiness) networkMode(String networkMode) oomKillDisable(Boolean oomKillDisable) oomScoreAdj(Integer oomScoreAdj) portBindings(Map<String, ? extends List<PortBinding>> portBindings) privileged(Boolean privileged) publishAllPorts(Boolean publishAllPorts) readonlyRootfs(Boolean readonlyRootfs) restartPolicy(HostConfig.RestartPolicy restartPolicy) securityOpt(Iterable<String> securityOpt) securityOpt(String... securityOpt) storageOpt(Map<String, ? extends String> tmpfs) ulimits(Iterable<? extends HostConfig.Ulimit> ulimits) volumesFrom(Iterable<String> volumesFrom) volumesFrom(String... volumesFrom)
-
Method Details
-
binds
-
binds
-
binds
-
blkioWeight
-
blkioWeightDevice
HostConfig.Builder blkioWeightDevice(Iterable<? extends HostConfig.BlkioWeightDevice> blkioWeightDevice) -
blkioDeviceReadBps
HostConfig.Builder blkioDeviceReadBps(Iterable<? extends HostConfig.BlkioDeviceRate> blkioDeviceReadBps) -
blkioDeviceWriteBps
HostConfig.Builder blkioDeviceWriteBps(Iterable<? extends HostConfig.BlkioDeviceRate> blkioDeviceWriteBps) -
blkioDeviceReadIOps
HostConfig.Builder blkioDeviceReadIOps(Iterable<? extends HostConfig.BlkioDeviceRate> blkioDeviceReadIOps) -
blkioDeviceWriteIOps
HostConfig.Builder blkioDeviceWriteIOps(Iterable<? extends HostConfig.BlkioDeviceRate> blkioDeviceWriteIOps) -
containerIdFile
-
lxcConf
-
lxcConf
-
privileged
-
portBindings
-
links
-
links
-
publishAllPorts
-
dns
-
dns
-
dnsOptions
-
dnsOptions
-
dnsSearch
-
dnsSearch
-
extraHosts
-
extraHosts
-
groupAdd
-
groupAdd
-
volumesFrom
-
volumesFrom
-
capAdd
-
capAdd
-
capDrop
-
capDrop
-
networkMode
-
securityOpt
-
securityOpt
-
devices
-
devices
-
memory
-
memorySwap
-
memorySwappiness
-
kernelMemory
Deprecated. -
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
-
runtime
-
mounts
-
mounts
-
init
-
sysctls
-
addSysctl
-
deviceRequests
-
build
HostConfig build()
-