Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default to Bazel target architecture #2245

Open
pauldraper opened this issue Apr 12, 2023 · 3 comments
Open

Default to Bazel target architecture #2245

pauldraper opened this issue Apr 12, 2023 · 3 comments
Labels
Can Close? Will close in 30 days unless there is a comment indicating why not

Comments

@pauldraper
Copy link

pauldraper commented Apr 12, 2023

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

@uhthomas
Copy link
Collaborator

uhthomas commented May 5, 2023

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

"@io_bazel_rules_docker//platforms:image_transition_cpu": "@platforms//cpu:" + {
# Architecture aliases.
"386": "x86_32",
"amd64": "x86_64",
"ppc64le": "ppc",
}.get(attr.architecture, attr.architecture),
"@io_bazel_rules_docker//platforms:image_transition_os": "@platforms//os:" + attr.operating_system,

@pauldraper
Copy link
Author

pauldraper commented Jun 5, 2023

Right, and my point is that the architecture of the image should default to the Bazel target platform (--cpu).

Currently, it defaults to amd64

default = "amd64",

Copy link

This issue has been automatically marked as stale because it has not had any activity for 180 days. It will be closed if no further activity occurs in 30 days.
Collaborators can add an assignee to keep this open indefinitely. Thanks for your contributions to rules_docker!

@github-actions github-actions bot added the Can Close? Will close in 30 days unless there is a comment indicating why not label Dec 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Can Close? Will close in 30 days unless there is a comment indicating why not
Projects
None yet
Development

No branches or pull requests

2 participants