Package com.spotify.docker.client
Class DockerClient.BuildParam
java.lang.Object
com.spotify.docker.client.DockerClient.Param
com.spotify.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.BuildParam
cpusetCpus
(Integer cpusetCpus) CPUs in which to allow execution, e.g.static DockerClient.BuildParam
CPU shares (relative weight).static DockerClient.BuildParam
Create a custom parameter.static DockerClient.BuildParam
dockerfile
(Path dockerfile) path within the build context to the Dockerfile.static DockerClient.BuildParam
forceRm()
Always remove intermediate containers.static DockerClient.BuildParam
Set memory limit for build.static DockerClient.BuildParam
Repository name (and optionally a tag) to be applied to the resulting image in case of success.static DockerClient.BuildParam
noCache()
Do not use the cache when building the image.static DockerClient.BuildParam
Always attempt to pull a newer version of the base image even if one exists locally.static DockerClient.BuildParam
quiet()
Suppress verbose build output.static DockerClient.BuildParam
A Git repository URI or HTTP/HTTPS URI build source.static DockerClient.BuildParam
rm()
Remove intermediate containers after a successful build.static DockerClient.BuildParam
rm
(boolean rm) Control whether to remove intermediate containers after a successful build.static DockerClient.BuildParam
totalMemory
(Integer totalMemory) Total memory (memory + swap).Methods inherited from class com.spotify.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
-