Default to Bazel target architecture
🚀 feature request
Relevant Rules
container_image
Description
The target architecture is always transitioned. By default it transitions to amd64.
The sensible behavior is to use the current target architecture. It's weird that it doesn't, and rules_docker seems to have gone out of its way(?) to make it like that.
Describe the solution you'd like
--
Describe alternatives you've considered
Disable rules_docker transitions and do it myself.
It should transition to the target architecture of the image, given:
https://github.com/bazelbuild/rules_docker/blob/8e70c6bcb584a15a8fd061ea489b933c0ff344ca/container/image.bzl#L805-L811
Right, and my point is that the architecture of the image should default to the Bazel target platform (--cpu).
Currently, it defaults to amd64 https://github.com/bazelbuild/rules_docker/blob/8e70c6bcb584a15a8fd061ea489b933c0ff344ca/container/image.bzl#L578