2025-10-14 22:18:53 -04:00
|
|
|
# Test that explicit platform overrides base image detection
|
|
|
|
|
|
|
|
|
|
-- Cargo.toml --
|
|
|
|
|
[package]
|
|
|
|
|
name = "test-app"
|
|
|
|
|
version = "0.1.0"
|
|
|
|
|
edition = "2021"
|
|
|
|
|
|
|
|
|
|
[dependencies]
|
|
|
|
|
-- src/main.rs --
|
|
|
|
|
fn main() {
|
|
|
|
|
println!("Hello, world!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# When platform is explicit, no detection should happen
|
|
|
|
|
env RUST_LOG=info
|
2025-10-15 11:56:14 -04:00
|
|
|
[linux] exec ./krust build --no-push --platform linux/amd64 .
|
|
|
|
|
[darwin] exec ./krust build --no-push --platform linux/amd64 .
|
2025-10-14 22:18:53 -04:00
|
|
|
! stderr 'Detecting available platforms'
|
|
|
|
|
stderr 'Building for platform: linux/amd64'
|