mirror of
https://github.com/imjasonh/krust
synced 2026-07-08 06:45:32 +00:00
Merge pull request #6 from imjasonh/feat/detect-base-image-platforms
chore: Add alpine-base example for multi-platform testing
This commit is contained in:
commit
a056514f48
3 changed files with 11 additions and 18 deletions
19
.github/workflows/ci.yml
vendored
19
.github/workflows/ci.yml
vendored
|
|
@ -200,25 +200,8 @@ jobs:
|
|||
run: cargo build --release
|
||||
- name: Test multi-platform build with Alpine base
|
||||
run: |
|
||||
# Create a test project that uses Alpine (which supports many platforms)
|
||||
mkdir -p test-alpine-platforms/src
|
||||
cat > test-alpine-platforms/Cargo.toml << 'EOF'
|
||||
[package]
|
||||
name = "test-alpine"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[package.metadata.krust]
|
||||
base-image = "alpine:latest"
|
||||
EOF
|
||||
cat > test-alpine-platforms/src/main.rs << 'EOF'
|
||||
fn main() {
|
||||
println!("Hello from Alpine multi-platform test!");
|
||||
}
|
||||
EOF
|
||||
|
||||
# Test that platform detection works (even if we can't build all platforms)
|
||||
cd test-alpine-platforms
|
||||
cd example/alpine-base
|
||||
../target/release/krust build --no-push --image test.local/alpine-test:latest . 2>&1 | tee build.log
|
||||
|
||||
# Verify platform detection happened
|
||||
|
|
|
|||
7
example/alpine-base/Cargo.toml
Normal file
7
example/alpine-base/Cargo.toml
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
[package]
|
||||
name = "test-alpine"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
[package.metadata.krust]
|
||||
base-image = "alpine:latest"
|
||||
3
example/alpine-base/src/main.rs
Normal file
3
example/alpine-base/src/main.rs
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fn main() {
|
||||
println!("Hello from Alpine multi-platform test!");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue