diff --git a/extensions/container-image/deployment/src/main/java/io/quarkus/container/image/deployment/ContainerImageConfig.java b/extensions/container-image/deployment/src/main/java/io/quarkus/container/image/deployment/ContainerImageConfig.java index f093801383318..9db9a56e09fc7 100644 --- a/extensions/container-image/deployment/src/main/java/io/quarkus/container/image/deployment/ContainerImageConfig.java +++ b/extensions/container-image/deployment/src/main/java/io/quarkus/container/image/deployment/ContainerImageConfig.java @@ -24,7 +24,7 @@ public class ContainerImageConfig { */ @ConfigItem(defaultValue = "${quarkus.application.name:unset}") @ConvertWith(TrimmedStringConverter.class) - public Optional name; + public String name; /** * The tag of the container image. If not set defaults to the application version diff --git a/extensions/container-image/deployment/src/main/java/io/quarkus/container/image/deployment/ContainerImageProcessor.java b/extensions/container-image/deployment/src/main/java/io/quarkus/container/image/deployment/ContainerImageProcessor.java index 0558bd01afc5f..742e2a718e54e 100644 --- a/extensions/container-image/deployment/src/main/java/io/quarkus/container/image/deployment/ContainerImageProcessor.java +++ b/extensions/container-image/deployment/src/main/java/io/quarkus/container/image/deployment/ContainerImageProcessor.java @@ -89,8 +89,7 @@ public void publishImageInfo(ApplicationInfoBuildItem app, } String effectiveName = containerImageCustomName.map(ContainerImageCustomNameBuildItem::getName) - .or(() -> containerImageConfig.name) - .orElse(app.getName()); + .orElse(containerImageConfig.name); String repository = (containerImageConfig.getEffectiveGroup().map(s -> s + "/").orElse("")) + effectiveName; if (!ImageReference.isValidRepository(repository)) { throw new IllegalArgumentException("The supplied combination of container-image group '"