diff --git a/extensions/container-image/container-image-docker/deployment/src/main/java/io/quarkus/container/image/docker/deployment/DockerConfig.java b/extensions/container-image/container-image-docker/deployment/src/main/java/io/quarkus/container/image/docker/deployment/DockerConfig.java index b9b06ee6bfe835..fa13ce661509e9 100644 --- a/extensions/container-image/container-image-docker/deployment/src/main/java/io/quarkus/container/image/docker/deployment/DockerConfig.java +++ b/extensions/container-image/container-image-docker/deployment/src/main/java/io/quarkus/container/image/docker/deployment/DockerConfig.java @@ -58,6 +58,12 @@ public class DockerConfig { @ConfigItem public Optional executableName; + /** + * Additional arbitrary arguments passed to the executable when building the container image. + */ + @ConfigItem + public Optional> additionalArgs; + /** * Configuration for Docker Buildx options */ diff --git a/extensions/container-image/container-image-docker/deployment/src/main/java/io/quarkus/container/image/docker/deployment/DockerProcessor.java b/extensions/container-image/container-image-docker/deployment/src/main/java/io/quarkus/container/image/docker/deployment/DockerProcessor.java index a0229147776415..4691322c042531 100644 --- a/extensions/container-image/container-image-docker/deployment/src/main/java/io/quarkus/container/image/docker/deployment/DockerProcessor.java +++ b/extensions/container-image/container-image-docker/deployment/src/main/java/io/quarkus/container/image/docker/deployment/DockerProcessor.java @@ -303,6 +303,7 @@ private String[] getDockerArgs(String image, DockerfilePaths dockerfilePaths, Co dockerArgs.add("--network"); dockerArgs.add(network); }); + dockerConfig.additionalArgs.ifPresent(dockerArgs::addAll); dockerArgs.addAll(Arrays.asList("-t", image)); if (useBuildx) {