Skip to content

Pusher binary wrongly transitioned to target platform #2287

@lionelfleury

Description

@lionelfleury

🐞 bug report

Affected Rule

Pusher binary wrongly transitioned to target platform. Instead of being run on exec one.

Is this a regression?

introduced by e48c7cc

Description

A clear and concise description of the problem...

Trying to push a container from another platform doesn't work if these are not exec compatible.
Example: darwin/arm/v8 vs. linux/amd64

🔬 Minimal Reproduction

Any container_push rule cannot work on a darwin arm machine if building a linux/amd64 container.

bazel run <container_push target> --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64

This results in Exec format error.

🔥 Exception or Error


[your-runfiles-folder]/../io_bazel_rules_docker/container/go/cmd/pusher/pusher_/pusher: cannot execute binary file: Exec format error

🌍 Your Environment

Operating System:

  

  

Output of bazel version:

  

  

Rules_docker version:

  

  

Anything else relevant?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions