Package nl.lexemmens.podman.service
Class BuildahExecutorService
- java.lang.Object
-
- nl.lexemmens.podman.service.BuildahExecutorService
-
public class BuildahExecutorService extends Object
Class that allows very specific execution of Podman related commands.
-
-
Constructor Summary
Constructors Constructor Description BuildahExecutorService(org.apache.maven.plugin.logging.Log log, PodmanConfiguration podmanConfig, CommandExecutorDelegate delegate)Constructs a new instance of this class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanupLocalContainerStorage()Implementation of the 'buildah unshare' command
-
-
-
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 systempodmanConfig- Contains Podman specific configuration, such as tlsVerify and podman's root directorydelegate- A delegate executor that executed the actual command
-
-
Method Detail
-
cleanupLocalContainerStorage
public void cleanupLocalContainerStorage() throws org.apache.maven.plugin.MojoExecutionExceptionImplementation 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
-
-