#!/usr/bin/env -S v -n -w -cg -gc none -cc tcc -d use_openssl -enable-globals run import freeflowuniverse.herolib.virt.herorun // Create user with SSH key using sshagent module mut user := herorun.new_user(keyname: 'id_ed25519')! // Create executor with Alpine Python base image mut executor := herorun.new_executor( node_ip: '65.21.132.119' user: 'root' container_id: 'python_alpine_container' keyname: 'id_ed25519' image_script: 'examples/virt/herorun/images/python_server.sh' base_image: .alpine_python // Use Alpine with Python pre-installed )! // Setup container executor.setup()! // Create container with Python Alpine base and Python server script mut container := executor.get_or_create_container( name: 'python_alpine_container' image_script: 'examples/virt/herorun/images/python_server.sh' base_image: .alpine_python )! println('āœ… Setup complete with Python Alpine container') println('Container: python_alpine_container') println('Base image: Alpine Linux with Python 3 pre-installed') println('Entry point: python_server.sh') // Test the container to show Python is available println('\nšŸ Testing Python availability...') python_test := executor.execute('runc exec python_alpine_container python3 --version') or { println('āŒ Python test failed: ${err}') return } println('āœ… Python version: ${python_test}') println('\nšŸš€ Running Python HTTP server...') println('Note: This will start the server and exit (use runc run for persistent server)') // Run the container to start the Python server result := executor.execute('runc run python_alpine_container') or { println('āŒ Container execution failed: ${err}') return } println('šŸ“‹ Server output:') println(result) println('\nšŸŽ‰ Python Alpine container executed successfully!') println('šŸ’” The Python HTTP server would run on port 8000 if started persistently')