{"record":{"id":"d71f0400cffadceb","repo":"GoogleContainerTools/jib","slug":"the-configured-platform-s-s-doesn-t-match-the","errorCode":null,"errorMessage":"the configured platform (%s/%s) doesn't match the platform (%s/%s) of the base image (%s)","messagePattern":"the configured platform \\((.+?)/(.+?)\\) doesn't match the platform \\((.+?)/(.+?)\\) of the base image \\((.+?)\\)","errorType":"exception","errorClass":"PlatformNotFoundInBaseImageException","httpStatus":null,"severity":"error","filePath":"jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/PlatformChecker.java","lineNumber":72,"sourceCode":"              baseImageName);\n      throw new PlatformNotFoundInBaseImageException(msg);\n    } else {\n      Platform platform = platforms.iterator().next();\n      if (!platform.getArchitecture().equals(containerConfig.getArchitecture())\n          || !platform.getOs().equals(containerConfig.getOs())) {\n\n        // Unfortunately, \"platforms\" has amd64/linux by default even if the user didn't explicitly\n        // configure it. Skip reporting to suppress false alarm.\n        if (!(platform.getArchitecture().equals(\"amd64\") && platform.getOs().equals(\"linux\"))) {\n          String msg =\n              String.format(\n                  \"the configured platform (%s/%s) doesn't match the platform (%s/%s) of the base image (%s)\",\n                  platform.getArchitecture(),\n                  platform.getOs(),\n                  containerConfig.getArchitecture(),\n                  containerConfig.getOs(),\n                  baseImageName);\n          throw new PlatformNotFoundInBaseImageException(msg);\n        }\n      }\n    }\n  }\n}\n","sourceCodeStart":54,"sourceCodeEnd":78,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/PlatformChecker.java#L54-L78","documentation":"Jib checks that the platform (architecture/OS) configured for the build matches what the base image's container config actually declares. When a mismatch is found, PlatformNotFoundInBaseImageException is thrown so the build stops rather than producing an image claiming a platform the base image cannot support. This typically means the base image is not compatible with the requested target platform.","triggerScenarios":"Building with jib configured with a platform (e.g. <platform><architecture>arm64</architecture><os>linux</os></platform>) whose arch/os differs from the containerConfig in the pulled base image manifest (e.g. base image is amd64/linux); checkManifestPlatform compares configured Platform against containerConfig.getArchitecture()/getOs().","commonSituations":"Setting architecture/os in Maven/Gradle jib config to something other than the base image's native platform (e.g. asking for arm64 but using an amd64-only base like openjdk:8); typos like 'aarch64' vs 'arm64' or 'osx' vs 'darwin'; pulling a base image by tag that points to the wrong-arch variant.","solutions":["Change the configured platform architecture/os to match the base image (e.g. amd64/linux)","Choose a base image variant that supports the target platform (e.g. use a multi-arch or arm64-specific tag like eclipse-temurin:17-jre)","Fix typos in the platform values (arm64 vs aarch64, linux vs lnx, darwin vs osx)","If you need a non-native platform, ensure the base image manifest actually contains that platform variant"],"exampleFix":"// before (pom.xml)\n<platform><architecture>arm64</architecture><os>linux</os></platform>\n<from><image>openjdk:8-jdk-alpine</image></from>  // amd64-only image\n// after\n<from><image>eclipse-temurin:17-jre</image></from>  // multi-arch, has arm64 variant","handlingStrategy":"validation","validationCode":"docker manifest inspect $BASE_IMAGE | jq -e --arg arch \"$TARGET_ARCH\" --arg os \"$TARGET_OS\" '.manifests[]? | select(.platform.architecture==$arch and .platform.os==$os)'","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Validate platform config against base image variants before building","Prefer multi-arch base images"],"tags":["docker","platform-mismatch","base-image","jib"],"backgroundTag":"unsupported-platform","analyzedSha":"fb949e2676afbbd7dd7a1ef61e20251931325654","analyzedAt":"2026-09-06T14:04:09.491Z","contentChangedAt":"2026-09-06T14:04:09.491Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}