{"record":{"id":"f3b194fc9a1917c2","repo":"GoogleContainerTools/jib","slug":"detected-multi-platform-configuration-only-buildi","errorCode":null,"errorMessage":"Detected multi-platform configuration, only building image that matches the local Docker Engine's os and architecture (%s/%s) or the first platform specified","messagePattern":"Detected multi-platform configuration, only building image that matches the local Docker Engine's os and architecture \\((.+?)/(.+?)\\) or the first platform specified","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/StepsRunner.java","lineNumber":673,"sourceCode":"\n  @VisibleForTesting\n  String normalizeArchitecture(String architecture) {\n    // Create mapping based on https://docs.docker.com/engine/install/#supported-platforms\n    if (architecture.equals(\"x86_64\")) {\n      return \"amd64\";\n    } else if (architecture.equals(\"aarch64\")) {\n      return \"arm64\";\n    }\n    return architecture;\n  }\n\n  @VisibleForTesting\n  Image fetchBuiltImageForLocalBuild(\n      String osType, String architecture, EventHandlers eventHandlers)\n      throws InterruptedException, ExecutionException {\n    if (results.baseImagesAndBuiltImages.get().size() > 1) {\n      eventHandlers.dispatch(\n          LogEvent.warn(\n              String.format(\n                  \"Detected multi-platform configuration, only building image that matches the local Docker Engine's os and architecture (%s/%s) or \"\n                      + \"the first platform specified\",\n                  osType, architecture)));\n      for (Map.Entry<Image, Future<Image>> imageEntry :\n          results.baseImagesAndBuiltImages.get().entrySet()) {\n        Image image = imageEntry.getValue().get();\n        if (image.getArchitecture().equals(architecture) && image.getOs().equals(osType)) {\n          return image;\n        }\n      }\n    }\n    return results.baseImagesAndBuiltImages.get().values().iterator().next().get();\n  }\n}\n","sourceCodeStart":655,"sourceCodeEnd":689,"githubUrl":"https://github.com/GoogleContainerTools/jib/blob/fb949e2676afbbd7dd7a1ef61e20251931325654/jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/StepsRunner.java#L655-L689","documentation":"When building straight to a local Docker daemon, Jib can only produce one image matching the daemon's os/architecture. If the configuration specifies multiple platforms, Jib logs this warning and builds only the platform matching the local Docker Engine (or the first specified), ignoring the rest.","triggerScenarios":"StepsRunner.fetchBuiltImageForLocalBuild sees results.baseImagesAndBuiltImages.size() > 1 (a multi-platform jib.platforms configuration) during a `jib:dockerBuild` / jib DockerBuild request, dispatches this LogEvent.warn, then selects the image matching the given osType/architecture.","commonSituations":"Users configure <platforms> with linux/amd64 plus linux/arm64 expecting a multi-arch manifest via dockerBuild; multi-platform only works with `jib:build` (registry push), not local Docker builds.","solutions":["Use `jib:build` (build to a registry) instead of `jib:dockerBuild` to produce a true multi-platform manifest","Keep only the single platform matching the local Docker Engine if a local build is required","Load each platform separately with `jib:dockerBuild -Djib.platform` per architecture if local images are needed"],"exampleFix":"// before\nmvn jib:dockerBuild   // with platforms amd64+arm64 -> warning, single image\n// after\nmvn jib:build         // multi-platform manifest pushed to registry","handlingStrategy":"fallback","validationCode":"// In Maven POM, only use multiple platforms with jib:build\n// Guard in CI: if dockerBuild is used, assert single platform\ngrep -q '<platform>' pom.xml && ! mvn -q jib:help -Dgoal=dockerBuild >/dev/null 2>&1 && echo \"use jib:build for multi-platform\"","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use jib:build (registry push) for multi-platform images; dockerBuild only for single-platform local loads","Match the configured platform to the local Docker Engine's os/arch when building locally","Document that extra platforms are silently ignored by dockerBuild"],"tags":["jib","docker","multi-platform"],"backgroundTag":"unsupported-operation","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"}