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 List<String> |
extractBaseImages(File dockerFile,
org.codehaus.plexus.interpolation.fixed.FixedStringSearchInterpolator interpolator)
Extract the base images from a dockerfile.
|
static String[] |
extractDelimiters(String filter) |
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
|
static com.google.gson.JsonObject |
readDockerConfig() |
static Map<String,?> |
readKubeConfig() |
public static List<String> extractBaseImages(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.public static com.google.gson.JsonObject readDockerConfig()
Copyright © 2020. All rights reserved.