GoogleContainerTools/jib · error · PlatformNotFoundInBaseImageException

cannot build for multiple platforms since the base image '%s

Error message

cannot build for multiple platforms since the base image '%s' is not a manifest list.

What it means

When the build requests multiple platforms, Jib requires the base image to be a manifest list so each platform can resolve its own base variant. PlatformChecker.checkManifestPlatform throws PlatformNotFoundInBaseImageException if the base image resolved to a single manifest (not a manifest list) and more than one platform is configured.

Source

Thrown at jib-core/src/main/java/com/google/cloud/tools/jib/builder/steps/PlatformChecker.java:55

   * @param containerConfig container configuration JSON of the base image
   */
  static void checkManifestPlatform(
      BuildContext buildContext, ContainerConfigurationTemplate containerConfig)
      throws PlatformNotFoundInBaseImageException {
    Optional<Path> path = buildContext.getBaseImageConfiguration().getTarPath();
    String baseImageName =
        path.map(Path::toString)
            .orElse(buildContext.getBaseImageConfiguration().getImage().toString());

    Set<Platform> platforms = buildContext.getContainerConfiguration().getPlatforms();
    Verify.verify(!platforms.isEmpty());

    if (platforms.size() != 1) {
      String msg =
          String.format(
              "cannot build for multiple platforms since the base image '%s' is not a manifest list.",
              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

  1. Use a multi-arch base image tag (e.g. eclipse-temurin:17-jammy) whose registry manifest is a manifest list.
  2. Request only one platform when the base image is single-architecture; run separate builds per architecture.
  3. Verify with `docker buildx imagetools inspect <base>` that the base is a manifest list with your target platforms.
  4. Remove the registry digest pin to a single manifest; pin to the manifest-list digest instead.
  5. If using a `docker://` or daemon base image, that can only be single-platform; switch to a registry reference.

Example fix

// before
<jib.container.platforms>
  <platform><os>linux</os><architecture>amd64</architecture></platform>
  <platform><os>linux</os><architecture>arm64</architecture></platform>
</jib.container.platforms>
<baseImage>mycompany/base:custom</baseImage> <!-- single-arch -->
// after: either one platform, or a manifest-list base
<baseImage>eclipse-temurin:17-jammy</baseImage>
Defensive patterns

Strategy: validation

Validate before calling

// Verify base image is a manifest list before requesting multiple platforms
ManifestList ml = registry.inspectManifestList("eclipse-temurin:17-jammy");
if (ml == null) throw new IllegalStateException("base is not a manifest list; use one platform");

Type guard

null

Try / catch

try { /* jib multi-platform build */ } catch (PlatformNotFoundInBaseImageException e) { /* fall back to single-platform build or switch base image */ }

Prevention

When it happens

Trigger: Configuring jib.container.platforms (or `--platform=linux/amd64,linux/arm64`) with 2+ platforms while the base image tag resolves to a single-architecture manifest instead of a multi-arch manifest list.

Common situations: Pointing at a tag that isn't multi-arch (e.g. a locally tagged image, `docker://` base image, or a single-arch vendor image); pinning base image by digest to a single manifest; older base images without manifest list support; mixing a docker daemon base image with multi-platform builds.

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


AI-assisted analysis of GoogleContainerTools/jib@fb949e2676 (2026-09-06). Data as JSON: /api/errors/055235621645cfe9. Report an issue: GitHub.