Package io.fabric8.openshift.api.model
Class DockerBuildStrategy
- java.lang.Object
-
- io.fabric8.openshift.api.model.DockerBuildStrategy
-
- All Implemented Interfaces:
io.fabric8.kubernetes.api.builder.Editable<DockerBuildStrategyBuilder>,io.fabric8.kubernetes.api.model.KubernetesResource,Serializable
@Generated("io.fabric8.kubernetes.schema.generator.model.ModelGenerator") public class DockerBuildStrategy extends Object implements io.fabric8.kubernetes.api.builder.Editable<DockerBuildStrategyBuilder>, io.fabric8.kubernetes.api.model.KubernetesResource
DockerBuildStrategy defines input parameters specific to container image build.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DockerBuildStrategy()No args constructor for use in serializationDockerBuildStrategy(List<io.fabric8.kubernetes.api.model.EnvVar> buildArgs, String dockerfilePath, List<io.fabric8.kubernetes.api.model.EnvVar> env, Boolean forcePull, io.fabric8.kubernetes.api.model.ObjectReference from, String imageOptimizationPolicy, Boolean noCache, io.fabric8.kubernetes.api.model.LocalObjectReference pullSecret, List<BuildVolume> volumes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DockerBuildStrategyBuilderedit()Map<String,Object>getAdditionalProperties()List<io.fabric8.kubernetes.api.model.EnvVar>getBuildArgs()buildArgs contains build arguments that will be resolved in the Dockerfile.StringgetDockerfilePath()dockerfilePath is the path of the Dockerfile that will be used to build the container image, relative to the root of the context (contextDir).List<io.fabric8.kubernetes.api.model.EnvVar>getEnv()env contains additional environment variables you want to pass into a builder container.BooleangetForcePull()forcePull describes if the builder should pull the images from registry prior to building.io.fabric8.kubernetes.api.model.ObjectReferencegetFrom()DockerBuildStrategy defines input parameters specific to container image build.StringgetImageOptimizationPolicy()imageOptimizationPolicy describes what optimizations the system can use when building images to reduce the final size or time spent building the image.BooleangetNoCache()noCache if set to true indicates that the container image build must be executed with the --no-cache=true flagio.fabric8.kubernetes.api.model.LocalObjectReferencegetPullSecret()DockerBuildStrategy defines input parameters specific to container image build.List<BuildVolume>getVolumes()volumes is a list of input volumes that can be mounted into the builds runtime environment.voidsetAdditionalProperties(Map<String,Object> additionalProperties)voidsetAdditionalProperty(String name, Object value)voidsetBuildArgs(List<io.fabric8.kubernetes.api.model.EnvVar> buildArgs)buildArgs contains build arguments that will be resolved in the Dockerfile.voidsetDockerfilePath(String dockerfilePath)dockerfilePath is the path of the Dockerfile that will be used to build the container image, relative to the root of the context (contextDir).voidsetEnv(List<io.fabric8.kubernetes.api.model.EnvVar> env)env contains additional environment variables you want to pass into a builder container.voidsetForcePull(Boolean forcePull)forcePull describes if the builder should pull the images from registry prior to building.voidsetFrom(io.fabric8.kubernetes.api.model.ObjectReference from)DockerBuildStrategy defines input parameters specific to container image build.voidsetImageOptimizationPolicy(String imageOptimizationPolicy)imageOptimizationPolicy describes what optimizations the system can use when building images to reduce the final size or time spent building the image.voidsetNoCache(Boolean noCache)noCache if set to true indicates that the container image build must be executed with the --no-cache=true flagvoidsetPullSecret(io.fabric8.kubernetes.api.model.LocalObjectReference pullSecret)DockerBuildStrategy defines input parameters specific to container image build.voidsetVolumes(List<BuildVolume> volumes)volumes is a list of input volumes that can be mounted into the builds runtime environment.DockerBuildStrategyBuildertoBuilder()
-
-
-
Constructor Detail
-
DockerBuildStrategy
public DockerBuildStrategy()
No args constructor for use in serialization
-
DockerBuildStrategy
public DockerBuildStrategy(List<io.fabric8.kubernetes.api.model.EnvVar> buildArgs, String dockerfilePath, List<io.fabric8.kubernetes.api.model.EnvVar> env, Boolean forcePull, io.fabric8.kubernetes.api.model.ObjectReference from, String imageOptimizationPolicy, Boolean noCache, io.fabric8.kubernetes.api.model.LocalObjectReference pullSecret, List<BuildVolume> volumes)
-
-
Method Detail
-
getBuildArgs
public List<io.fabric8.kubernetes.api.model.EnvVar> getBuildArgs()
buildArgs contains build arguments that will be resolved in the Dockerfile. See https://docs.docker.com/engine/reference/builder/#/arg for more details. NOTE: Only the 'name' and 'value' fields are supported. Any settings on the 'valueFrom' field are ignored.
-
setBuildArgs
public void setBuildArgs(List<io.fabric8.kubernetes.api.model.EnvVar> buildArgs)
buildArgs contains build arguments that will be resolved in the Dockerfile. See https://docs.docker.com/engine/reference/builder/#/arg for more details. NOTE: Only the 'name' and 'value' fields are supported. Any settings on the 'valueFrom' field are ignored.
-
getDockerfilePath
public String getDockerfilePath()
dockerfilePath is the path of the Dockerfile that will be used to build the container image, relative to the root of the context (contextDir). Defaults to `Dockerfile` if unset.
-
setDockerfilePath
public void setDockerfilePath(String dockerfilePath)
dockerfilePath is the path of the Dockerfile that will be used to build the container image, relative to the root of the context (contextDir). Defaults to `Dockerfile` if unset.
-
getEnv
public List<io.fabric8.kubernetes.api.model.EnvVar> getEnv()
env contains additional environment variables you want to pass into a builder container.
-
setEnv
public void setEnv(List<io.fabric8.kubernetes.api.model.EnvVar> env)
env contains additional environment variables you want to pass into a builder container.
-
getForcePull
public Boolean getForcePull()
forcePull describes if the builder should pull the images from registry prior to building.
-
setForcePull
public void setForcePull(Boolean forcePull)
forcePull describes if the builder should pull the images from registry prior to building.
-
getFrom
public io.fabric8.kubernetes.api.model.ObjectReference getFrom()
DockerBuildStrategy defines input parameters specific to container image build.
-
setFrom
public void setFrom(io.fabric8.kubernetes.api.model.ObjectReference from)
DockerBuildStrategy defines input parameters specific to container image build.
-
getImageOptimizationPolicy
public String getImageOptimizationPolicy()
imageOptimizationPolicy describes what optimizations the system can use when building images to reduce the final size or time spent building the image. The default policy is 'None' which means the final build image will be equivalent to an image created by the container image build API. The experimental policy 'SkipLayers' will avoid commiting new layers in between each image step, and will fail if the Dockerfile cannot provide compatibility with the 'None' policy. An additional experimental policy 'SkipLayersAndWarn' is the same as 'SkipLayers' but simply warns if compatibility cannot be preserved.
-
setImageOptimizationPolicy
public void setImageOptimizationPolicy(String imageOptimizationPolicy)
imageOptimizationPolicy describes what optimizations the system can use when building images to reduce the final size or time spent building the image. The default policy is 'None' which means the final build image will be equivalent to an image created by the container image build API. The experimental policy 'SkipLayers' will avoid commiting new layers in between each image step, and will fail if the Dockerfile cannot provide compatibility with the 'None' policy. An additional experimental policy 'SkipLayersAndWarn' is the same as 'SkipLayers' but simply warns if compatibility cannot be preserved.
-
getNoCache
public Boolean getNoCache()
noCache if set to true indicates that the container image build must be executed with the --no-cache=true flag
-
setNoCache
public void setNoCache(Boolean noCache)
noCache if set to true indicates that the container image build must be executed with the --no-cache=true flag
-
getPullSecret
public io.fabric8.kubernetes.api.model.LocalObjectReference getPullSecret()
DockerBuildStrategy defines input parameters specific to container image build.
-
setPullSecret
public void setPullSecret(io.fabric8.kubernetes.api.model.LocalObjectReference pullSecret)
DockerBuildStrategy defines input parameters specific to container image build.
-
getVolumes
public List<BuildVolume> getVolumes()
volumes is a list of input volumes that can be mounted into the builds runtime environment. Only a subset of Kubernetes Volume sources are supported by builds. More info: https://kubernetes.io/docs/concepts/storage/volumes
-
setVolumes
public void setVolumes(List<BuildVolume> volumes)
volumes is a list of input volumes that can be mounted into the builds runtime environment. Only a subset of Kubernetes Volume sources are supported by builds. More info: https://kubernetes.io/docs/concepts/storage/volumes
-
edit
public DockerBuildStrategyBuilder edit()
- Specified by:
editin interfaceio.fabric8.kubernetes.api.builder.Editable<DockerBuildStrategyBuilder>
-
toBuilder
public DockerBuildStrategyBuilder toBuilder()
-
-