rules_docker icon indicating copy to clipboard operation
rules_docker copied to clipboard

Default to Bazel target architecture

Open pauldraper opened this issue 2 years ago • 3 comments

🚀 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.

pauldraper avatar Apr 12 '23 20:04 pauldraper

It should transition to the target architecture of the image, given:

https://github.com/bazelbuild/rules_docker/blob/8e70c6bcb584a15a8fd061ea489b933c0ff344ca/container/image.bzl#L805-L811

uhthomas avatar May 05 '23 13:05 uhthomas

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

pauldraper avatar Jun 05 '23 17:06 pauldraper