public class DockerFileUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator |
createInterpolator(MojoParameters params,
String filter)
Create an interpolator for the given maven parameters and filter configuration.
|
static String |
extractBaseImage(File dockerFile,
org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator interpolator)
Extract the base image from a dockerfile.
|
static List<String[]> |
extractLines(File dockerFile,
String keyword,
org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator interpolator)
Extract all lines containing the given keyword
|
static String |
interpolate(File dockerFile,
org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator interpolator)
Interpolate a docker file with the given properties and filter
|
public static String extractBaseImage(File dockerFile, org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator interpolator) throws IOException
FROM is
taken.dockerFile - file from where to extract the base imageinterpolator - interpolator for replacing propertiesIOExceptionpublic static List<String[]> extractLines(File dockerFile, String keyword, org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator interpolator) throws IOException
dockerFile - dockerfile to examinekeyword - keyword to extract the lines forinterpolator - interpolator for replacing propertiesIOExceptionpublic static String interpolate(File dockerFile, org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator interpolator) throws IOException
dockerFile - docker file to interpolateinterpolator - interpolator for replacing propertiesIOExceptionpublic static org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator createInterpolator(MojoParameters params, String filter)
params - The maven parameters.filter - The filter configuration.Copyright © 2018. All rights reserved.