Class BuildContext


  • public final class BuildContext
    extends Object
    Configuration settings for Docker build context.
    • Constructor Detail

      • BuildContext

        public BuildContext()
    • Method Detail

      • contextUri

        public String contextUri()
        Get the contextUri property: [Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. <seealso href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" />.
        Returns:
        the contextUri value.
      • withContextUri

        public BuildContext withContextUri​(String contextUri)
        Set the contextUri property: [Required] URI of the Docker build context used to build the image. Supports blob URIs on environment creation and may return blob or Git URIs. <seealso href="https://docs.docker.com/engine/reference/commandline/build/#extended-description" />.
        Parameters:
        contextUri - the contextUri value to set.
        Returns:
        the BuildContext object itself.
      • dockerfilePath

        public String dockerfilePath()
        Get the dockerfilePath property: Path to the Dockerfile in the build context. <seealso href="https://docs.docker.com/engine/reference/builder/" />.
        Returns:
        the dockerfilePath value.
      • withDockerfilePath

        public BuildContext withDockerfilePath​(String dockerfilePath)
        Set the dockerfilePath property: Path to the Dockerfile in the build context. <seealso href="https://docs.docker.com/engine/reference/builder/" />.
        Parameters:
        dockerfilePath - the dockerfilePath value to set.
        Returns:
        the BuildContext object itself.
      • validate

        public void validate()
        Validates the instance.
        Throws:
        IllegalArgumentException - thrown if the instance is not valid.