diff --git a/dev/Containerfile b/dev/Containerfile
index e3609bf..fac2c80 100644
--- a/dev/Containerfile
+++ b/dev/Containerfile
@@ -12,7 +12,11 @@ COPY --from=docker.io/library/maven:3-eclipse-temurin-21 /usr/share/maven/ref/se
RUN ln -s ${MAVEN_HOME}/bin/mvn /usr/bin/mvn
-ENV MAVEN_CONFIG "/root/.m2"
+# The entrypoint copied from the maven image runs under `set -u` and dereferences
+# $MAVEN_CONFIG with no default, so it must be set or the container fails to start.
+# It is unset before mvn runs, so the value only governs where the entrypoint stages
+# its reference files — point it at a path writable by any uid (ilo runs rootless).
+ENV MAVEN_CONFIG "/tmp/.m2"
ENTRYPOINT ["/usr/local/bin/mvn-entrypoint.sh"]
CMD ["mvn"]
diff --git a/pom.xml b/pom.xml
index b89d4f4..276d15b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -184,6 +184,22 @@
+
+
+ org.jacoco
+ jacoco-maven-plugin
+
+
+ **/*Builder.class
+ **/*Builder$*.class
+ **/NativeImageSmokeTest.class
+
+
+
diff --git a/src/main/java/wtf/metio/devcontainer/Build.java b/src/main/java/wtf/metio/devcontainer/Build.java
index 12ba184..ee2983f 100644
--- a/src/main/java/wtf/metio/devcontainer/Build.java
+++ b/src/main/java/wtf/metio/devcontainer/Build.java
@@ -23,6 +23,9 @@
* image. Cached image identifiers are passed to the docker build command with --cache-from. Note that
* the array syntax will execute the command without a shell. You can learn more about formatting
* string vs array properties.
+ * @param options An array of additional arguments that should be passed to the docker build command when building a
+ * Dockerfile. Defaults to not set. For example: "build": { "options": [ "--add-host=host.docker
+ * .internal:host-gateway" ] }
*/
@RecordBuilder
@RecordBuilder.Options(buildMethodName = "create")
@@ -31,7 +34,8 @@ public record Build(
String context,
Map args,
String target,
- List cacheFrom) implements BuildBuilder.With {
+ List cacheFrom,
+ List options) implements BuildBuilder.With {
public static BuildBuilder builder() {
return BuildBuilder.builder();
diff --git a/src/main/java/wtf/metio/devcontainer/CommandDeserializer.java b/src/main/java/wtf/metio/devcontainer/CommandDeserializer.java
index ecef659..9590085 100644
--- a/src/main/java/wtf/metio/devcontainer/CommandDeserializer.java
+++ b/src/main/java/wtf/metio/devcontainer/CommandDeserializer.java
@@ -12,6 +12,7 @@
import tools.jackson.databind.JavaType;
import tools.jackson.databind.JsonNode;
import tools.jackson.databind.deser.std.StdDeserializer;
+import tools.jackson.databind.exc.MismatchedInputException;
import tools.jackson.databind.node.StringNode;
public final class CommandDeserializer extends StdDeserializer {
@@ -38,7 +39,7 @@ public Command deserialize(final JsonParser parser, final DeserializationContext
return new Command(null, null, context.readTreeAsValue(node, type));
}
- return context.reportInputMismatch(Command.class, "Cannot deserialize given input to Command");
+ throw MismatchedInputException.from(parser, Command.class, "Cannot deserialize given input to Command");
}
}
diff --git a/src/main/java/wtf/metio/devcontainer/Devcontainer.java b/src/main/java/wtf/metio/devcontainer/Devcontainer.java
index e301b1f..889b6ae 100644
--- a/src/main/java/wtf/metio/devcontainer/Devcontainer.java
+++ b/src/main/java/wtf/metio/devcontainer/Devcontainer.java
@@ -77,10 +77,10 @@
* @param securityOpt Defaults to []. Cross-orchestrator way to set container security options. For
* example: "securityOpt": [ "seccomp=unconfined" ]
* @param mounts Defaults to unset. Cross-orchestrator way to add additional mounts to a container.
- * Each value is a string that accepts the same values as the Docker CLI --mount
- * flag. Environment and pre-defined variables may be referenced in the value. For
- * example: "mounts": [{ "source": "dind-var-lib-docker", "target":
- * "/var/lib/docker", "type": "volume" }]
+ * Each value is either a string that accepts the same values as the Docker CLI
+ * --mount flag or an object with the equivalent named fields. Environment and
+ * pre-defined variables may be referenced in the value. For example: "mounts": [{
+ * "source": "dind-var-lib-docker", "target": "/var/lib/docker", "type": "volume" }]
* @param features An object of Dev Container Feature IDs and related options to be added into your
* primary container. The specific options that are available varies by feature, so
* see its documentation for additional details. For example: "features": {
@@ -90,6 +90,9 @@
* allows you to override the Feature install order when needed. For example:
* "overrideFeatureInstallorder": [ "ghcr.io/devcontainers/features/common-utils",
* "ghcr.io/devcontainers/features/github-cli" ]
+ * @param secrets Recommended secrets for this dev container. Recommendations are provided as
+ * environment variable keys, each mapped to optional metadata such as a description
+ * and documentation URL.
* @param customizations Product specific properties, defined in supporting tools
* @param image Required when using an image. The name of an image in a container registry
* (DockerHub, GitHub Container Registry, Azure Container Registry) that
@@ -200,9 +203,10 @@ public record Devcontainer(
Boolean privileged,
List capAdd,
List securityOpt,
- List