Files
herolib/examples/virt/heropods/runcommands.vsh
Mahmoud-Emad 3ae980d4c5 refactor: Rename heropods variable and method
- Rename `factory` to `heropods_`
- Rename `factory.new` to `heropods_.container_new`
- Update error message for `heropods.new`
2025-11-11 10:11:01 +02:00

20 lines
500 B
GLSL
Executable File

#!/usr/bin/env -S v -n -w -cg -gc none -cc tcc -d use_openssl -enable-globals run
import incubaid.herolib.virt.heropods
mut heropods_ := heropods.new(
reset: false
use_podman: true
) or { panic('Failed to init HeroPods: ${err}') }
mut container := heropods_.container_new(
name: 'alpine_demo'
image: .custom
custom_image_name: 'alpine_3_20'
docker_url: 'docker.io/library/alpine:3.20'
)!
container.start()!
container.exec(cmd: 'ls')!
container.stop()!