bazelbuild / bazelbuild/rules_docker

Pusher binary wrongly transitioned to target platform

Open
#2,287 0 comments 1 reaction 0 assignees View on GitHub
Dominant language
Starlark
Stars
1.1k
Forks
689
PR merge metrics
No merged PRs in 30d

Description

# 🐞 bug report

### Affected Rule

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

### Is this a regression?

introduced by https://github.com/bazelbuild/rules_docker/commit/e48c7cc71773ab69abd0ee08ae47bafff4b5845a

### 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 --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?**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.