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 from,
Map<String,String> fromExt,
List<String> ports,
String imagePullPolicy,
List<String> volumes,
List<String> tags,
Map<String,String> env,
Map<String,String> labels,
String workdir,
Arguments cmd,
String user,
Arguments entryPoint,
AssemblyConfiguration assembly,
Boolean skip,
String contextDir,
String dockerFile,
String dockerArchive,
String filter,
String maintainer,
Arguments shell,
List<String> runCmds,
String cleanup,
Boolean nocache,
Boolean optimise,
Map<String,String> args,
HealthCheckConfiguration healthCheck,
ArchiveCompression compression,
Map<String,String> buildOptions,
Map<String,String> createImageOptions,
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()
Array of images used for build cache resolution.
|
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() |
Map<String,String> |
getCreateImageOptions()
Map specifying the create image options to provide to the docker daemon when pulling or importing an image.
|
File |
getDockerArchive() |
File |
getDockerArchiveFile()
Path to archive file passed to docker daemon.
|
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 image 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 from, Map<String,String> fromExt, List<String> ports, String imagePullPolicy, List<String> volumes, List<String> tags, Map<String,String> env, Map<String,String> labels, String workdir, Arguments cmd, String user, Arguments entryPoint, AssemblyConfiguration assembly, Boolean skip, String contextDir, String dockerFile, String dockerArchive, String filter, String maintainer, Arguments shell, List<String> runCmds, String cleanup, Boolean nocache, Boolean optimise, Map<String,String> args, HealthCheckConfiguration healthCheck, ArchiveCompression compression, Map<String,String> buildOptions, Map<String,String> createImageOptions, 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 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.
This field is applicable for all build strategies.
public String getImagePullPolicy()
This field is applicable for all build strategies.
public Map<String,String> getEnv()
This field is applicable for all build strategies.
public Map<String,String> getLabels()
This field is applicable for all build strategies.
public String getWorkdir()
This field is applicable for all build strategies.
public Arguments getCmd()
This field is applicable for all build strategies.
public String getUser()
USER Dockerfile directive).
This field is applicable for all build strategies.
public Arguments getEntryPoint()
This field is applicable for all build strategies.
public AssemblyConfiguration getAssembly()
This field is applicable for all build strategies.
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 @…@).
This field is applicable only for docker build strategy
public String getMaintainer()
This field is applicable only for docker build strategy
public Arguments getShell()
runCmds. It contains arg elements which are defining the
executable and its params.
This field is applicable only for docker build strategy
public String getCleanup()
This field is applicable only for docker build strategy
public Boolean getNocache()
This field is applicable only for docker build strategy
public Boolean getOptimise()
runCmds into a single RUN directive so that
only one image layer is created.
This field is applicable only for docker build strategy
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.
This field is applicable only for docker build strategy
public HealthCheckConfiguration getHealthCheck()
This field is applicable only for docker build strategy
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).
This field is applicable only for docker build strategy
public Map<String,String> getCreateImageOptions()
These options map to the ones listed as query parameters in the Docker Remote API and are restricted to simple options (e.g.: fromImage, fromSrc, platform).
This field is applicable only for docker build strategy
public File getDockerFileFile()
This field is applicable only for docker build strategy
public File getDockerArchiveFile()
This field is applicable only for docker build strategy
public List<String> getCacheFrom()
This field is applicable only for docker build strategy
protected boolean canEqual(Object other)
Copyright © 2024. All rights reserved.