GoogleContainerTools/jib · error · PlatformNotFoundInBaseImageException
the configured platform (%s/%s) doesn't match the platform (
Error message
the configured platform (%s/%s) doesn't match the platform (%s/%s) of the base image (%s)
What it means
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.
Source
Thrown at jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/PlatformChecker.java:72
baseImageName);
throw new PlatformNotFoundInBaseImageException(msg);
} else {
Platform platform = platforms.iterator().next();
if (!platform.getArchitecture().equals(containerConfig.getArchitecture())
|| !platform.getOs().equals(containerConfig.getOs())) {
// Unfortunately, "platforms" has amd64/linux by default even if the user didn't explicitly
// configure it. Skip reporting to suppress false alarm.
if (!(platform.getArchitecture().equals("amd64") && platform.getOs().equals("linux"))) {
String msg =
String.format(
"the configured platform (%s/%s) doesn't match the platform (%s/%s) of the base image (%s)",
platform.getArchitecture(),
platform.getOs(),
containerConfig.getArchitecture(),
containerConfig.getOs(),
baseImageName);
throw new PlatformNotFoundInBaseImageException(msg);
}
}
}
}
}
View on GitHub (pinned to fb949e2676)
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
Example fix
// before (pom.xml) <platform><architecture>arm64</architecture><os>linux</os></platform> <from><image>openjdk:8-jdk-alpine</image></from> // amd64-only image // after <from><image>eclipse-temurin:17-jre</image></from> // multi-arch, has arm64 variant
Defensive patterns
Strategy: validation
Validate before calling
docker manifest inspect $BASE_IMAGE | jq -e --arg arch "$TARGET_ARCH" --arg os "$TARGET_OS" '.manifests[]? | select(.platform.architecture==$arch and .platform.os==$os)'
Prevention
- Validate platform config against base image variants before building
- Prefer multi-arch base images
When it happens
Trigger: 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().
Common situations: 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.
Understand the failure class
Background: "unsupported platform" / "not supported on this platform" errors: what they mean and how to fix them — this error's family across 47 libraries.
Related errors
- The input JAR (${jarPath}) is compiled with Java ${jarJavaVe
- Cannot run Jib in offline mode; <imageReference> not found i
- Your project is using Java ${projectMajorJavaVersion} but th
- HelpfulSuggestions.forIncompatibleBaseImageJavaVersionForGra
- HelpfulSuggestions.forIncompatibleBaseImageJavaVersionForGra
AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06).
Data as JSON: /api/errors/d71f0400cffadceb.
Report an issue: GitHub.