Skip to content

ko only builds one platform when -L is specified #1591

@marcintustin

Description

@marcintustin

I'm building with

KO_CONFIG_PATH=ko.yaml KO_DOCKER_REPO='repo.artifactory.prod.gcp.bvnt.co/federated-docker-rase/cubestoredumper' ko build --bare --tags=9715bf2e-dirty --sbom=none -L --platform linux/amd64,linux/arm64

The base image brings these labels in

            "Labels": {
                "dev.chainguard.image.title": "go",
                "dev.chainguard.package.main": "go-1.24",
                "org.opencontainers.image.authors": "Chainguard Team https://www.chainguard.dev/",
                "org.opencontainers.image.base.digest": "sha256:9ab908e8995d90f23d96dffc1590e4ab0bb7940c61c94014bfca89f479f52bec",
                "org.opencontainers.image.created": "2025-12-09T16:15:39Z",
                "org.opencontainers.image.source": "https://github.com/chainguard-images/images-private/tree/main/images/go",
                "org.opencontainers.image.title": "go",
                "org.opencontainers.image.url": "https://images.chainguard.dev/directory/image/go/overview",
                "org.opencontainers.image.vendor": "Chainguard"
            },

But docker image inspect shows only one platform:

[
    {
        "Id": "sha256:55cf2c1b5ee0725c6b466c6605508b9d379680531fd108c16ffbfc1c7c9c68c1",
        "RepoTags": [
            "repo.artifactory.prod.gcp.bvnt.co/federated-docker-rase/cubestoredumper:9715bf2e-dirty",
            "repo.artifactory.prod.gcp.bvnt.co/federated-docker-rase/cubestoredumper:aa38f729dbf58476563e6149bafe458b6f6540aebc5f7a63e14783ac0b097037",
            "repo.artifactory.prod.gcp.bvnt.co/federated-docker-rase/cubestoredumper:tf-awb-project-9715bf2e-dirty"
        ],
        "RepoDigests": [
            "repo.artifactory.prod.gcp.bvnt.co/federated-docker-rase/cubestoredumper@sha256:55cf2c1b5ee0725c6b466c6605508b9d379680531fd108c16ffbfc1c7c9c68c1"
        ],
        "Parent": "",
        "Comment": "go build output, at /ko-app/cubestoredumper",
        "Created": "0001-01-01T00:00:00Z",
        "DockerVersion": "",
        "Author": "github.com/ko-build/ko",
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 286740208,

Is there something I'm missing to get this all together as one image?

I've tried with v0.17.1 and v0.18.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions