Package org.mandas.docker.client
Class DockerClient.BuildParam
java.lang.Object
org.mandas.docker.client.DockerClient.Param
org.mandas.docker.client.DockerClient.BuildParam
- Enclosing interface:
- DockerClient
Flags which can be passed to the
build method.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DockerClient.BuildParamcpusetCpus(Integer cpusetCpus) CPUs in which to allow execution, e.g.static DockerClient.BuildParamCPU shares (relative weight).static DockerClient.BuildParamCreate a custom parameter.static DockerClient.BuildParamdockerfile(Path dockerfile) path within the build context to the Dockerfile.static DockerClient.BuildParamforceRm()Always remove intermediate containers.static DockerClient.BuildParamSet memory limit for build.static DockerClient.BuildParamRepository name (and optionally a tag) to be applied to the resulting image in case of success.static DockerClient.BuildParamnoCache()Do not use the cache when building the image.static DockerClient.BuildParamAlways attempt to pull a newer version of the base image even if one exists locally.static DockerClient.BuildParamquiet()Suppress verbose build output.static DockerClient.BuildParamA Git repository URI or HTTP/HTTPS URI build source.static DockerClient.BuildParamrm()Remove intermediate containers after a successful build.static DockerClient.BuildParamrm(boolean rm) Control whether to remove intermediate containers after a successful build.static DockerClient.BuildParamtotalMemory(Integer totalMemory) Total memory (memory + swap).Methods inherited from class org.mandas.docker.client.DockerClient.Param
equals, hashCode, name, value
-
Constructor Details
-
BuildParam
-
-
Method Details
-
name
Repository name (and optionally a tag) to be applied to the resulting image in case of success.You could also pass the name explicitly to
DockerClient.build(Path, String, BuildParam...)or one of the other build methods that takes an explicit name.- Parameters:
name- A name to apply to the image- Returns:
- BuildParam
-
create
Create a custom parameter.- Parameters:
name- custom namevalue- custom value- Returns:
- BuildParam
-
quiet
Suppress verbose build output.- Returns:
- BuildParam
-
rm
Remove intermediate containers after a successful build.- Returns:
- BuildParam
-
rm
Control whether to remove intermediate containers after a successful build.- Parameters:
rm- Whether to remove- Returns:
- BuildParam
-
noCache
Do not use the cache when building the image.- Returns:
- BuildParam
-
forceRm
Always remove intermediate containers.- Returns:
- BuildParam
-
pullNewerImage
Always attempt to pull a newer version of the base image even if one exists locally.- Returns:
- BuildParam
-
dockerfile
path within the build context to the Dockerfile. This is ignored ifremote(URI)is specified and points to an individual filename.You could also pass the dockerfile path explicitly to
DockerClient.build(Path, String, String, ProgressHandler, BuildParam...)or one of the other build methods that takes an explicit dockerfile path.- Parameters:
dockerfile- Path to the dockerfile in the build context.- Returns:
- BuildParam
-
remote
A Git repository URI or HTTP/HTTPS URI build source. If the URI specifies a filename, the file's contents are placed into a file called `Dockerfile`.- Parameters:
remote- A Git repository URI or HTTP/HTTPS URI build source.- Returns:
- BuildParam
-
memory
Set memory limit for build.- Parameters:
memory- Memory limit for build, in bytes.- Returns:
- BuildParam
-
totalMemory
Total memory (memory + swap). Set to -1 to enable unlimited swap.- Parameters:
totalMemory- Total memory (memory + swap) in bytes.- Returns:
- BuildParam
-
cpusetCpus
CPUs in which to allow execution, e.g.0-3,0,1.- Parameters:
cpusetCpus- CPUs in which to allow execution- Returns:
- BuildParam
-