Class PodmanBuildCommand.Builder

    • Constructor Detail

      • Builder

        public Builder​(org.apache.maven.plugin.logging.Log log,
                       PodmanConfiguration podmanConfig,
                       CommandExecutorDelegate delegate)
        Construct a new instance of this builder
        Parameters:
        log - The Maven log
        podmanConfig - The Podman configuration
        delegate - The executor delegate
    • Method Detail

      • setSquash

        public PodmanBuildCommand.Builder setSquash()
        Sets whether all layers should be squashed
        Returns:
        This builder instance
      • setSquashAll

        public PodmanBuildCommand.Builder setSquashAll()
        Sets whether all layers should be squashed
        Returns:
        This builder instance
      • setLayers

        public PodmanBuildCommand.Builder setLayers​(Boolean layers)
        Sets the layers option
        Parameters:
        layers - Sets the value of the layers option
        Returns:
        This builder instance
      • setFormat

        public PodmanBuildCommand.Builder setFormat​(String format)
        Sets the format of the containers metadata
        Parameters:
        format - The value of the format option to set
        Returns:
        This builder instance
      • setContextDir

        public PodmanBuildCommand.Builder setContextDir​(String contextDir)
        Sets the context directory to use
        Parameters:
        contextDir - the context directory to set
        Returns:
        This builder instance
      • setContainerFile

        public PodmanBuildCommand.Builder setContainerFile​(Path containerFile)
        Sets the Containerfile that should be build
        Parameters:
        containerFile - The pointer towards the containerfile to use
        Returns:
        This builder instance
      • setPullPolicy

        public PodmanBuildCommand.Builder setPullPolicy​(String pullPolicy)
        Sets whether the base image should be pulled
        Parameters:
        pullPolicy - Sets whether to pull the image
        Returns:
        This builder instance
      • setNoCache

        public PodmanBuildCommand.Builder setNoCache​(boolean noCache)
        Sets whether or not to cache intermediate layers
        Parameters:
        noCache - Sets whether the noCache option should be used
        Returns:
        This builder instance
      • setPlatform

        public PodmanBuildCommand.Builder setPlatform​(String platform)
        Sets the platform for the resulting image rather using the default of the build system
        Parameters:
        platform - A valid combination of GO OS and GO ARCH for example linux/arm64 (https://golang.org/doc/install/source#environment)
        Returns:
        This builder instance
      • setTargetStage

        public PodmanBuildCommand.Builder setTargetStage​(String targetStage)
        Sets the platform for the resulting image rather using the default of the build system
        Parameters:
        targetStage - Sets the target build stage to build in a multi-stage build.
        Returns:
        This builder instance
      • build

        public Command build()
        Returns the constructed command
        Returns:
        The constructed command