Class 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 serialization
      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 Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      DockerBuildStrategyBuilder edit()  
      Map<String,​Object> getAdditionalProperties()  
      List<io.fabric8.kubernetes.api.model.EnvVar> getBuildArgs()
      buildArgs contains build arguments that will be resolved in the Dockerfile.
      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).
      List<io.fabric8.kubernetes.api.model.EnvVar> getEnv()
      env contains additional environment variables you want to pass into a builder container.
      Boolean getForcePull()
      forcePull describes if the builder should pull the images from registry prior to building.
      io.fabric8.kubernetes.api.model.ObjectReference getFrom()
      DockerBuildStrategy defines input parameters specific to container image build.
      String getImageOptimizationPolicy()
      imageOptimizationPolicy describes what optimizations the system can use when building images to reduce the final size or time spent building the image.
      Boolean getNoCache()
      noCache if set to true indicates that the container image build must be executed with the --no-cache=true flag
      io.fabric8.kubernetes.api.model.LocalObjectReference getPullSecret()
      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.
      void setAdditionalProperties​(Map<String,​Object> additionalProperties)  
      void setAdditionalProperty​(String name, Object value)  
      void setBuildArgs​(List<io.fabric8.kubernetes.api.model.EnvVar> buildArgs)
      buildArgs contains build arguments that will be resolved in the Dockerfile.
      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).
      void setEnv​(List<io.fabric8.kubernetes.api.model.EnvVar> env)
      env contains additional environment variables you want to pass into a builder container.
      void setForcePull​(Boolean forcePull)
      forcePull describes if the builder should pull the images from registry prior to building.
      void setFrom​(io.fabric8.kubernetes.api.model.ObjectReference from)
      DockerBuildStrategy defines input parameters specific to container image build.
      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.
      void setNoCache​(Boolean noCache)
      noCache if set to true indicates that the container image build must be executed with the --no-cache=true flag
      void setPullSecret​(io.fabric8.kubernetes.api.model.LocalObjectReference pullSecret)
      DockerBuildStrategy defines input parameters specific to container image build.
      void setVolumes​(List<BuildVolume> volumes)
      volumes is a list of input volumes that can be mounted into the builds runtime environment.
      DockerBuildStrategyBuilder toBuilder()  
    • 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
      • getAdditionalProperties

        public Map<String,​Object> getAdditionalProperties()
      • setAdditionalProperty

        public void setAdditionalProperty​(String name,
                                          Object value)
      • setAdditionalProperties

        public void setAdditionalProperties​(Map<String,​Object> additionalProperties)