2025-10-14 22:18:53 -04:00
|
|
|
# Test build with custom base image
|
|
|
|
|
|
|
|
|
|
-- Cargo.toml --
|
|
|
|
|
[package]
|
|
|
|
|
name = "test-app"
|
|
|
|
|
version = "0.1.0"
|
|
|
|
|
edition = "2021"
|
|
|
|
|
|
|
|
|
|
[dependencies]
|
|
|
|
|
|
|
|
|
|
[package.metadata.krust]
|
|
|
|
|
base-image = "alpine:latest"
|
|
|
|
|
-- src/main.rs --
|
|
|
|
|
fn main() {
|
|
|
|
|
println!("Hello from Alpine!");
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
# Build with custom base image
|
2025-10-15 11:56:14 -04:00
|
|
|
[linux] exec ./krust build --no-push --platform linux/amd64 .
|
|
|
|
|
[linux] stderr 'Building Rust project'
|
|
|
|
|
[linux] stderr 'base-image.*alpine'
|
|
|
|
|
[linux] stderr 'Successfully built image'
|
|
|
|
|
|
|
|
|
|
[darwin] exec ./krust build --no-push --platform linux/amd64 .
|
|
|
|
|
[darwin] stderr 'Building Rust project'
|
|
|
|
|
[darwin] stderr 'base-image.*alpine'
|
|
|
|
|
[darwin] stderr 'Successfully built image'
|