- Add `keep_alive` parameter to `container_start` - Implement logic to restart containers with `tail -f /dev/null` after successful entrypoint exit - Update `podman_pull_and_export` to also extract image metadata - Enhance `create_crun_config` to use extracted image metadata (ENTRYPOINT, CMD, ENV) - Refactor test suite to use `keep_alive: true` for Alpine containers
28 lines
729 B
Plaintext
28 lines
729 B
Plaintext
#!/usr/bin/env hero
|
|
|
|
// Step 1: Configure HeroPods instance
|
|
!!heropods.configure
|
|
name:'simple_demo'
|
|
reset:false
|
|
use_podman:true
|
|
|
|
|
|
// Step 2: Create a container with hero binary
|
|
!!heropods.container_new
|
|
name:'simple_container'
|
|
image:'custom'
|
|
custom_image_name:'hero_container'
|
|
docker_url:'docker.io/threefolddev/hero-container:latest'
|
|
|
|
// Step 3: Start the container with keep_alive enabled
|
|
// This will run the entrypoint, wait for it to complete, then inject a keep-alive process
|
|
!!heropods.container_start
|
|
name:'simple_container'
|
|
keep_alive:true
|
|
|
|
// Step 4: Execute hero command inside the container
|
|
!!heropods.container_exec
|
|
name:'simple_container'
|
|
cmd:'hero -help'
|
|
stdout:true
|