diff --git a/jkube-kit/config/image/src/main/java/org/eclipse/jkube/kit/config/image/build/BuildConfiguration.java b/jkube-kit/config/image/src/main/java/org/eclipse/jkube/kit/config/image/build/BuildConfiguration.java index b91a56ba4b..d2ffca8ab8 100644 --- a/jkube-kit/config/image/src/main/java/org/eclipse/jkube/kit/config/image/build/BuildConfiguration.java +++ b/jkube-kit/config/image/src/main/java/org/eclipse/jkube/kit/config/image/build/BuildConfiguration.java @@ -56,21 +56,143 @@ public class BuildConfiguration implements Serializable { public static final String DEFAULT_FILTER = "${*}"; public static final String DEFAULT_CLEANUP = "try"; + // Generic fields applicable to all build strategies + /** + * The base image which should be used for this image. + * + *
If not given this default to busybox:latest
and is suitable for a pure data image.
+ *
+ * This field is applicable for all build strategies. + */ + private String from; + /** + * Extended definition for a base image. This field holds a map of defined in key:value format. + *
The known keys are: + *
A provided {@link BuildConfiguration#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.
+ */
+ private Map The format can be either pure numerical (
+ * This field is applicable for all build strategies.
+ */
+ @Singular
+ private List
+ * This field is applicable for all build strategies.
+ */
+ private String imagePullPolicy;
+
+ /**
+ * List of <volume%gt; elements to create a container volume.
+ * Whitespace is trimmed from each element and empty elements are ignored.
+ *
+ * This field is applicable for all build strategies.
+ */
+ @Singular
+ private List
+ * This field is applicable for all build strategies.
+ */
+ @Singular
+ private List
+ * This field is applicable for all build strategies.
+ */
+ @Singular("putEnv")
+ private Map
+ * This field is applicable for all build strategies.
+ */
+ @Singular
+ private Map
+ * This field is applicable for all build strategies.
+ */
+ private String workdir;
+
+ /**
+ * A command to execute by default.
+ *
+ * This field is applicable for all build strategies.
+ */
+ private Arguments cmd;
+
+ /**
+ * User to which the image should switch to the end (corresponds to the
+ * This field is applicable for all build strategies.
+ */
+ private String user;
+
+ /**
+ * An entrypoint allows you to configure a container that will run as an executable.
+ *
+ * This field is applicable for all build strategies.
+ */
+ private Arguments entryPoint;
+
+ /**
+ * Specifies the assembly configuration.
+ *
+ * This field is applicable for all build strategies.
+ */
+ private AssemblyConfiguration assembly;
+
+ /**
+ * If set to true disables building of the image.
+ *
+ * This field is applicable for all build strategies.
+ */
+ private Boolean skip;
+
+ // Docker build strategy specific configuration options
/**
* Path to a directory used for the build's context. You can specify the Dockerfile to use with dockerFile, which by
* default is the Dockerfile found in the contextDir.
- * The Dockerfile can be also located outside of the contextDir, if provided with an absolute file path.
+ * The Dockerfile can be also located outside the contextDir, if provided with an absolute file path.
+ *
+ * This field is applicable only for
+ * This field is applicable only for
+ * This field is applicable only for By default properties in the format
+ * This field is applicable only for If not given this default to The known keys are:
- * A provided {@link BuildConfiguration#from} takes precedence over the name given here.
- * This tag is useful for extensions of this plugin.
- */
- private Map
+ * This field is applicable only for The format can be either pure numerical (
+ * This field is applicable only for This setting is not to be confused with the <run> section for this image which specifies the runtime
* behaviour when starting containers.
+ *
+ * This field is applicable only for
+ * This field is applicable only for
+ * This field is applicable only for
+ * This field is applicable only for 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
+ * This field is applicable only for
+ * This field is applicable only for
+ * This field is applicable only for
+ * This field is applicable only for
+ * This field is applicable only for
+ * This field is applicable only for
+ * This field is applicable only for 8080
) or with the protocol attached (8080/tcp
).
+ * USER
Dockerfile directive).
+ * docker
build strategy
*/
private String contextDir;
/**
* Path to a Dockerfile which also triggers Dockerfile mode.
* The Docker build context directory is set to contextDir
if given.
* If not the directory by default is the directory in which the Dockerfile is stored.
+ * docker
build strategy
*/
private String dockerFile;
/**
* Path to a docker archive to load an image instead of building from scratch.
* If a dockerArchive is provided, no {@link BuildConfiguration#dockerFile} must be given.
+ * docker
build strategy
*/
private String dockerArchive;
/**
@@ -78,45 +200,24 @@ public class BuildConfiguration implements Serializable {
*
* ${..}
are replaced with Maven properties.
* When using a single char like @
then this is used as a delimiter (e.g @…@).
+ * docker
build strategy
*/
private String filter;
- /**
- * The base image which should be used for this image.
- *
- * busybox:latest
and is suitable for a pure data image.
- */
- private String from;
- /**
- * Extended definition for a base image. This field holds a map of defined in key:value format.
- *
- *
- * docker
build strategy
*/
private String maintainer;
- /**
- * The exposed ports which is a list of <port> elements, one for each port to expose.
- * Whitespace is trimmed from each element and empty elements are ignored.
- *
- * 8080
) or with the protocol attached (8080/tcp
).
- */
- @Singular
- private Listdocker
build strategy
*/
private Arguments shell;
- /**
- * Specific pull policy for the base image. This overrides any global image pull policy.
- */
- private String imagePullPolicy;
+
/**
* Commands to be run during the build process.
*
@@ -128,6 +229,8 @@ public class BuildConfiguration implements Serializable {
*
* docker
build strategy
*/
@Singular
private Listdocker
build strategy
*/
private String cleanup;
/**
* Don't use Docker’s build cache.
+ * docker
build strategy
*/
private Boolean nocache;
/**
* If set to true then it will compress all the {@link BuildConfiguration#runCmds} into a single RUN directive so that
* only one image layer is created.
+ * docker
build strategy
*/
private Boolean optimise;
- /**
- * List of <volume%gt; elements to create a container volume.
- * Whitespace is trimmed from each element and empty elements are ignored.
- */
- @Singular
- private Listdocker
build strategy
*/
@Singular
private MapUSER
Dockerfile directive).
- */
- private String user;
/**
* Health check configuration.
+ * docker
build strategy
*/
private HealthCheckConfiguration healthCheck;
- /**
- * Specifies the assembly configuration.
- */
- private AssemblyConfiguration assembly;
- /**
- * If set to true disables building of the image.
- */
- private Boolean skip;
/**
* The compression mode how the build archive is transmitted to the docker daemon and how docker build archives are
* attached to this build as sources.
+ * docker
build strategy
*/
private ArchiveCompression compression;
/**
@@ -220,6 +289,8 @@ public class BuildConfiguration implements Serializable {
* simple options (e.g.: memory, shmsize).
*
* @see Docker Engine API v1.40
+ * docker
build strategy
*/
private Mapdocker
build strategy
*/
private Mapdocker
build strategy
*/
@Setter(AccessLevel.PRIVATE)
private File dockerFileFile;
+ /**
+ * Path to archive file passed to docker daemon.
+ *
+ * docker
build strategy
+ */
@Setter(AccessLevel.PRIVATE)
private File dockerArchiveFile;
+ /**
+ * Array of images used for build cache resolution.
+ * docker
build strategy
+ */
@Singular("addCacheFrom")
private List