kasperl
03/14/2025, 3:40 PMimport system.containers
my-function -> int:
return 42
main arguments:
// We run multiple containers from the same image (the current one),
// so we need to distinguish between the outermost invocation and
// the ones for the child containers.
if arguments is Map:
exit my-function
// Here we are passing an empty map to main in the other container,
// so we can distinguish between the child and the parent container.
container := containers.start containers.current {:}
print container.wait