Class BuildahExecutorService


  • public class BuildahExecutorService
    extends Object
    Class that allows very specific execution of Podman related commands.
    • Constructor Detail

      • BuildahExecutorService

        public BuildahExecutorService​(org.apache.maven.plugin.logging.Log log,
                                      PodmanConfiguration podmanConfig,
                                      CommandExecutorDelegate delegate)
        Constructs a new instance of this class.
        Parameters:
        log - Used to access Maven's log system
        podmanConfig - Contains Podman specific configuration, such as tlsVerify and podman's root directory
        delegate - A delegate executor that executed the actual command
    • Method Detail

      • cleanupLocalContainerStorage

        public void cleanupLocalContainerStorage()
                                          throws org.apache.maven.plugin.MojoExecutionException

        Implementation of the 'buildah unshare' command

        Attempts to clean up the local storage location by running the buildah unshare command. This only works when the podman root is configured in the pom file.

        To avoid accidentally clean up other files, this method does nothing when podman root is not specified.

        Throws:
        org.apache.maven.plugin.MojoExecutionException - In case execution of the buildah unshare command fails