Skip to content

Add support for --docker_platform flag - #994

Merged
DaveGay merged 3 commits into
bazelbuild:masterfrom
lamcw:master
Aug 8, 2023
Merged

DaveGay merged 3 commits into
bazelbuild:masterfrom
lamcw:master

Conversation

@lamcw

@lamcw lamcw commented Jan 24, 2023

Copy link
Copy Markdown
Contributor

When generating configs on a Mac (esp. ones with Apple silicon) using a Linux image, the docker daemon raises a warning

$ docker create --rm [a_linux_amd64_image] sleep infinity
The requested image's platform (linux/amd64) does not match the detected host platform (linux/arm64/v8) and no specific platform was requested
ff56913949408cfbad8d5b6d29888a741c2e1f2f3767695c78e75886619725ca

The rbe_config_gen expects the docker create command to return the container ID (which is 64 characters in length). The above warning breaks the contract and therefore will fail the config generation.

A possible solution is to add a --docker_platform flag to rbe_config_gen so that when it invokes docker create, a matching platform can be used to create the container (e.g. rbe_config_gen --docker_platform=linux/amd64 runs docker create --rm --platform linux/amd64 ...).

Closes #993

@lamcw

lamcw commented Aug 4, 2023 •

Copy link
Copy Markdown
Contributor Author

Hey @smukherj1 @DaveGay sorry for the ping, can you PTAL at this PR?

@DaveGay

DaveGay commented Aug 4, 2023

Copy link
Copy Markdown
Collaborator

Change looks good but buildkite doesn't seem to like it?

@lamcw

lamcw commented Aug 8, 2023

Copy link
Copy Markdown
Contributor Author

@DaveGay the error is in master as well https://buildkite.com/bazel/bazel-toolchains/builds/26184#0189d288-690f-431f-8e65-12afd8d9526c

Can we merge this and fix the buildifier error in a follow up PR?

@DaveGay
DaveGay merged commit 059f56e into bazelbuild:master Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Running rbe_configs_gen on macOS for Apple Silicon to generate configs for x86 Linux doesn't work

2 participants