diff --git a/extensions/container-image/container-image-jib/deployment/src/main/java/io/quarkus/container/image/jib/deployment/JibProcessor.java b/extensions/container-image/container-image-jib/deployment/src/main/java/io/quarkus/container/image/jib/deployment/JibProcessor.java index 83e01cdd95028..5b6dd13883442 100644 --- a/extensions/container-image/container-image-jib/deployment/src/main/java/io/quarkus/container/image/jib/deployment/JibProcessor.java +++ b/extensions/container-image/container-image-jib/deployment/src/main/java/io/quarkus/container/image/jib/deployment/JibProcessor.java @@ -161,7 +161,7 @@ public void buildFromNative(ContainerImageConfig containerImageConfig, JibConfig "The native binary produced by the build is not a Linux binary and therefore cannot be used in a Linux container image. Consider adding \"quarkus.native.container-build=true\" to your configuration"); } - JibContainerBuilder jibContainerBuilder = createContainerBuilderFromNative(containerImageConfig, jibConfig, + JibContainerBuilder jibContainerBuilder = createContainerBuilderFromNative(jibConfig, nativeImage, containerImageLabels); setUser(jibConfig, jibContainerBuilder); setPlatforms(jibConfig, jibContainerBuilder); @@ -517,7 +517,7 @@ private JibContainerBuilder createContainerBuilderFromLegacyJar(JibConfig jibCon } } - private JibContainerBuilder createContainerBuilderFromNative(ContainerImageConfig containerImageConfig, JibConfig jibConfig, + private JibContainerBuilder createContainerBuilderFromNative(JibConfig jibConfig, NativeImageBuildItem nativeImageBuildItem, List containerImageLabels) { List entrypoint; @@ -532,8 +532,8 @@ private JibContainerBuilder createContainerBuilderFromNative(ContainerImageConfi try { AbsoluteUnixPath workDirInContainer = AbsoluteUnixPath.get("/work"); JibContainerBuilder jibContainerBuilder = Jib - .from(toRegistryImage(ImageReference.parse(jibConfig.baseNativeImage), containerImageConfig.username, - containerImageConfig.password)) + .from(toRegistryImage(ImageReference.parse(jibConfig.baseNativeImage), jibConfig.baseRegistryUsername, + jibConfig.baseRegistryPassword)) .addFileEntriesLayer(FileEntriesLayer.builder() .addEntry(nativeImageBuildItem.getPath(), workDirInContainer.resolve(BINARY_NAME_IN_CONTAINER), FilePermissions.fromOctalString("775"))