Skip to content

run command: implement --userdata flag #39

Description

@radekg

Implement --userdata flag and follow the EC2 style for user data.

When resolving the flag, check if:

  • starts with a shebang like string, if yes, assume it's an inline command, embed the execution into the vminit service
  • if no shebang:
    • check if value starts with http:// or https://, if so, vminit will download and execute a remote program
    • check if the value is a host local path, require a specific path prefix and use filepath.Clean to make sure no host secret data can be put in the VM, read the file and put on the VM, vminit to execute the command
    • if none of the above, put the data as-is at a specific location in the VM, vminit will do nothing

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions