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 propertiesIOException
public 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 propertiesIOException
public static String interpolate(File dockerFile, org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator interpolator) throws IOException
dockerFile
- docker file to interpolateinterpolator
- interpolator for replacing propertiesIOException
public static org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator createInterpolator(MojoParameters params, String filter)
params
- The maven parameters.filter
- The filter configuration.Copyright © 2019. All rights reserved.