public class BuildConfiguration extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
BuildConfiguration.BuildConfigurationBuilder |
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_CLEANUP |
static String |
DEFAULT_FILTER |
| Constructor and Description |
|---|
BuildConfiguration() |
BuildConfiguration(String contextDir,
String dockerFile,
String dockerArchive,
String filter,
String from,
Map<String,String> fromExt,
String maintainer,
List<String> ports,
Arguments shell,
String imagePullPolicy,
List<String> runCmds,
String cleanup,
Boolean nocache,
Boolean optimise,
List<String> volumes,
List<String> tags,
Map<String,String> env,
Map<String,String> labels,
Map<String,String> args,
Arguments entryPoint,
String workdir,
Arguments cmd,
String user,
HealthCheckConfiguration healthCheck,
AssemblyConfiguration assembly,
Boolean skip,
ArchiveCompression compression,
Map<String,String> buildOptions,
File dockerFileFile,
File dockerArchiveFile,
List<String> cacheFrom) |
| Modifier and Type | Method and Description |
|---|---|
static BuildConfiguration.BuildConfigurationBuilder |
builder() |
File |
calculateDockerFilePath() |
protected boolean |
canEqual(Object other) |
CleanupMode |
cleanupMode() |
boolean |
equals(Object o) |
File |
getAbsoluteContextDirPath(String sourceDirectory,
String projectBaseDir) |
File |
getAbsoluteDockerFilePath(String sourceDirectory,
String projectBaseDir) |
File |
getAbsoluteDockerTarPath(String sourceDirectory,
String projectBaseDir) |
Map<String,String> |
getArgs()
Map specifying the value of Docker build args which should be used when building the image with an external
Dockerfile which uses build arguments.
|
AssemblyConfiguration |
getAssembly()
Specifies the assembly configuration.
|
Map<String,String> |
getBuildOptions()
Map specifying the build options to provide to the docker daemon when building the image.
|
List<String> |
getCacheFrom() |
String |
getCleanup()
Cleanup dangling (untagged) images after each build (including any containers created from them)
try: tries to remove the old image but doesn't fail the build if this is not possible
remove: removes old image or fails if it doesn't
none: No cleanup is requested
|
Arguments |
getCmd()
A command to execute by default.
|
ArchiveCompression |
getCompression() |
File |
getContextDir() |
String |
getContextDirRaw() |
File |
getDockerArchive() |
File |
getDockerArchiveFile() |
String |
getDockerArchiveRaw() |
File |
getDockerFile() |
File |
getDockerFileFile()
Path to Dockerfile to use, initialized lazily.
|
String |
getDockerFileRaw() |
Arguments |
getEntryPoint()
An entrypoint allows you to configure a container that will run as an executable.
|
Map<String,String> |
getEnv()
Environment variables.
|
String |
getFilter()
Enable and set the delimiters for property replacements.
|
String |
getFrom() |
Map<String,String> |
getFromExt()
Extended definition for a base image.
|
HealthCheckConfiguration |
getHealthCheck()
Health check configuration.
|
String |
getImagePullPolicy()
Specific pull policy for the base image.
|
Map<String,String> |
getLabels()
Labels.
|
String |
getMaintainer()
The author (MAINTAINER) field for the generated image
|
Boolean |
getNocache()
Don't use Docker’s build cache.
|
Boolean |
getOptimise()
If set to true then it will compress all the
runCmds into a single RUN directive so that
only one image layer is created. |
List<String> |
getPorts() |
List<String> |
getRunCmds() |
Arguments |
getShell()
Shell to be used for the
runCmds. |
Boolean |
getSkip() |
List<String> |
getTags() |
String |
getUser()
User to which the Dockerfile should switch to the end (corresponds to the
USER Dockerfile directive). |
List<String> |
getVolumes() |
String |
getWorkdir()
Directory to change to when starting the container.
|
int |
hashCode() |
String |
initAndValidate() |
boolean |
isDockerFileMode() |
boolean |
nocache() |
boolean |
optimise() |
BuildConfiguration.BuildConfigurationBuilder |
toBuilder() |
String |
validate() |
public static final String DEFAULT_FILTER
public static final String DEFAULT_CLEANUP
public BuildConfiguration(String contextDir, String dockerFile, String dockerArchive, String filter, String from, Map<String,String> fromExt, String maintainer, List<String> ports, Arguments shell, String imagePullPolicy, List<String> runCmds, String cleanup, Boolean nocache, Boolean optimise, List<String> volumes, List<String> tags, Map<String,String> env, Map<String,String> labels, Map<String,String> args, Arguments entryPoint, String workdir, Arguments cmd, String user, HealthCheckConfiguration healthCheck, AssemblyConfiguration assembly, Boolean skip, ArchiveCompression compression, Map<String,String> buildOptions, File dockerFileFile, File dockerArchiveFile, List<String> cacheFrom)
public BuildConfiguration()
public boolean isDockerFileMode()
public File getDockerFile()
public String getDockerFileRaw()
public File getDockerArchive()
public String getDockerArchiveRaw()
public String getContextDirRaw()
public String getFrom()
public Boolean getSkip()
public ArchiveCompression getCompression()
public boolean optimise()
public boolean nocache()
public CleanupMode cleanupMode()
public File getAbsoluteContextDirPath(String sourceDirectory, String projectBaseDir)
public File getAbsoluteDockerFilePath(String sourceDirectory, String projectBaseDir)
public File getAbsoluteDockerTarPath(String sourceDirectory, String projectBaseDir)
public String initAndValidate()
public String validate()
public static BuildConfiguration.BuildConfigurationBuilder builder()
public BuildConfiguration.BuildConfigurationBuilder toBuilder()
public String getFilter()
By default properties in the format ${..} are replaced with Maven properties.
When using a single char like @ then this is used as a delimiter (e.g @…@).
public Map<String,String> getFromExt()
The known keys are:
A provided from takes precedence over the name given here.
This tag is useful for extensions of this plugin.
public String getMaintainer()
public Arguments getShell()
runCmds. It contains arg elements which are defining the
executable and its params.public String getImagePullPolicy()
public String getCleanup()
public Boolean getNocache()
public Boolean getOptimise()
runCmds into a single RUN directive so that
only one image layer is created.public Map<String,String> getArgs()
The key-value syntax is the same as when defining Maven properties (or labels or env). This argument is ignored when no external Dockerfile is used.
public Arguments getEntryPoint()
public String getWorkdir()
public Arguments getCmd()
public String getUser()
USER Dockerfile directive).public HealthCheckConfiguration getHealthCheck()
public AssemblyConfiguration getAssembly()
public Map<String,String> getBuildOptions()
These options map to the ones listed as query parameters in the Docker Remote API and are restricted to simple options (e.g.: memory, shmsize).
public File getDockerFileFile()
public File getDockerArchiveFile()
protected boolean canEqual(Object other)
Copyright © 2021. All rights reserved.