Package nl.lexemmens.podman.service
Class ContainerfileDecorator
- java.lang.Object
-
- nl.lexemmens.podman.service.ContainerfileDecorator
-
public class ContainerfileDecorator extends Object
Class that brings support for decorating Containerfile. This means that it can:
- Decorate a specified source Containerfile by resolving properties configured in the
MavenProject - Decorate a specified source Containerfile by adding one or more label commands to the Containerfile
With respect to properties: Both properties specified via the properties tag in a pom file as well as the default Maven properties are supported
- Decorate a specified source Containerfile by resolving properties configured in the
-
-
Constructor Summary
Constructors Constructor Description ContainerfileDecorator(org.apache.maven.plugin.logging.Log log, org.apache.maven.shared.filtering.MavenFileFilter mavenFileFilter, org.apache.maven.project.MavenProject mavenProject)Constructs a new instance of this FilterSupport class.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecorateContainerfile(SingleImageConfiguration image)Decorates a Dockerfile by executing a series of actions to get to the final Dockerfile:
-
-
-
Constructor Detail
-
ContainerfileDecorator
public ContainerfileDecorator(org.apache.maven.plugin.logging.Log log, org.apache.maven.shared.filtering.MavenFileFilter mavenFileFilter, org.apache.maven.project.MavenProject mavenProject)Constructs a new instance of this FilterSupport class.- Parameters:
log- The loggermavenFileFilter- Maven's File Filtering servicemavenProject- The MavenProject
-
-
Method Detail
-
decorateContainerfile
public void decorateContainerfile(SingleImageConfiguration image) throws org.apache.maven.plugin.MojoExecutionException
Decorates a Dockerfile by executing a series of actions to get to the final Dockerfile:
- Use the
MavenFileFilterservice to filter the source Dockerfile and copy it to the target location. - Add labels to the target Dockerfile using the LABELS command.
- Parameters:
image- The BuildContext that contains the source and target Dockerfile paths- Throws:
org.apache.maven.plugin.MojoExecutionException- When the Dockerfile cannot be filtered.
- Use the
-
-