- Add `base_dir` field to `ContainerFactory` - Initialize `base_dir` from `CONTAINERS_DIR` env or user home - Replace hardcoded `/containers` paths with `base_dir` variable - Update image `created_at` retrieval to use `os.stat`
17 lines
452 B
GLSL
Executable File
17 lines
452 B
GLSL
Executable File
#!/usr/bin/env -S v -n -w -cg -gc none -cc tcc -d use_openssl -enable-globals run
|
|
|
|
import freeflowuniverse.herolib.virt.heropods
|
|
// Initialize factory
|
|
|
|
mut factory := heropods.new(
|
|
reset: false
|
|
use_podman: true
|
|
) or { panic('Failed to init ContainerFactory: ${err}') }
|
|
|
|
container := factory.new(
|
|
name: 'myalpine'
|
|
image: .custom
|
|
custom_image_name: 'alpine_3_20'
|
|
docker_url: 'docker.io/library/alpine:3.20'
|
|
)!
|