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

Make it possible to choose platform #1499

Open
Emilgardis opened this issue May 22, 2024 · 0 comments
Open

Make it possible to choose platform #1499

Emilgardis opened this issue May 22, 2024 · 0 comments

Comments

@Emilgardis
Copy link
Member

} else {
let same_arch = self
.toolchain
.iter()
.filter(|platform| {
&platform.architecture
== engine.arch.as_ref().unwrap_or(&Architecture::Amd64)
})
.collect::<Vec<_>>();
if same_arch.len() == 1 {
// pick the platform with the same architecture
same_arch.first().expect("should contain one element")
} else if let Some(platform) = same_arch
.iter()
.find(|platform| &platform.os == engine.os.as_ref().unwrap_or(&Os::Linux))
{
*platform
} else if let Some(platform) =
same_arch.iter().find(|platform| platform.os == Os::Linux)
{
// container engine should be fine with linux
platform
} else {
let platform = self
.toolchain
.first()
.expect("should be at least one platform");
// FIXME: Don't throw away
msg_info.warn(
format_args!("could not determine what toolchain to use for image, defaulting to `{}`", platform.target),
).ok();
platform
}
};

We should allow users to pick exactly which platform to run the docker image on.

related to #1498

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

No branches or pull requests

1 participant