Class DockerCreateContainer.HostConfig
- java.lang.Object
 - 
- com.bmuschko.gradle.docker.tasks.container.DockerCreateContainer.HostConfig
 
 
- 
- Enclosing class:
 - DockerCreateContainer
 
public static class DockerCreateContainer.HostConfig extends Object
- Since:
 - 6.0.0
 
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDockerCreateContainer.HostConfig.LogConfig 
- 
Constructor Summary
Constructors Constructor Description HostConfig(ObjectFactory objectFactory) 
- 
Method Summary
 
 - 
 
- 
- 
Constructor Detail
- 
HostConfig
@Inject public HostConfig(ObjectFactory objectFactory)
 
 - 
 
- 
Method Detail
- 
getGroups
@Input @Optional public final ListProperty<String> getGroups()
A list of additional groups that the container process will run as. 
- 
getDns
@Input @Optional public final ListProperty<String> getDns()
 
- 
getLinks
@Input @Optional public final ListProperty<String> getLinks()
 
- 
getVolumesFrom
@Input @Optional public final ListProperty<String> getVolumesFrom()
 
- 
getPortBindings
@Input @Optional public final ListProperty<String> getPortBindings()
 
- 
getBinds
@Input @Optional public final MapProperty<String,String> getBinds()
 
- 
getTmpFs
@Input @Optional public final MapProperty<String,String> getTmpFs()
Docker container tmpfs support.The key of this map is the container target path, the value stores the tmpfs comma-separated options.
For example, to create a temporary 50MB writeable non executable filesystem mounted under /data in the container:
tmpFs = ['/data': 'rw,noexec,size=50m']- Since:
 - 8.0.0
 
 
- 
getExtraHosts
@Input @Optional public final ListProperty<String> getExtraHosts()
 
- 
getLogConfig
@Input @Optional public final Property<DockerCreateContainer.HostConfig.LogConfig> getLogConfig()
 
- 
getDevices
@Input @Optional public final ListProperty<String> getDevices()
 
- 
getCapAdd
@Input @Optional public final ListProperty<String> getCapAdd()
- Since:
 - 8.1.0
 
 
- 
getCapDrop
@Input @Optional public final ListProperty<String> getCapDrop()
- Since:
 - 8.1.0
 
 
- 
getShmSize
@Input @Optional public final Property<Long> getShmSize()
Size of/dev/shmin bytes.The size must be greater than 0. If omitted the system uses 64MB.
 
- 
getAutoRemove
@Input @Optional public final Property<Boolean> getAutoRemove()
Automatically remove the container when the container's process exits.This has no effect if
restartPolicyis set. 
- 
getIpcMode
@Input @Optional public final Property<String> getIpcMode()
The IPC mode for the container.none- Own private IPC namespace, with /dev/shm not mounted.private- Own private IPC namespace.shareable"- Own private IPC namespace, with a possibility to share it with other containers.container <_name-or-ID_>- Join another ("shareable") container’s IPC namespace.host- Use the host system’s IPC namespace.
 
- 
getSysctls
@Input @Optional public final MapProperty<String,String> getSysctls()
The namespaced kernel parameters (sysctls) in the container.For example, to turn on IP forwarding in the containers network namespace:
sysctls = ['net.ipv4.ip_forward':'1']Note:
- Not all sysctls are namespaced.
 - Docker does not support changing sysctls inside of a container that also modify the host system.
 
 
- 
restartPolicy
public void restartPolicy(String name, int maximumRetryCount)
 
 - 
 
 -