Skip to content

Instantly share code, notes, and snippets.

@anonhostpi
Last active September 8, 2025 00:41
Show Gist options
  • Select an option

  • Save anonhostpi/05aa300aa56a3b1baf19561b3bc607f5 to your computer and use it in GitHub Desktop.

Select an option

Save anonhostpi/05aa300aa56a3b1baf19561b3bc607f5 to your computer and use it in GitHub Desktop.

Revisions

  1. anonhostpi revised this gist Sep 8, 2025. 1 changed file with 3 additions and 0 deletions.
    3 changes: 3 additions & 0 deletions cloud-init.yaml
    Original file line number Diff line number Diff line change
    @@ -1,3 +1,6 @@
    # $init = path/to/cloud-init.yaml
    # # (iwr "https://gist.github.com/anonhostpi/05aa300aa56a3b1baf19561b3bc607f5/raw/cloud-init.yaml").Content | Out-File $init
    #
    # multipass launch --name archive-wasm --memory 6G --disk 20G --cloud-init $init --network "<your-network-adapter>"
    # multipass mount "$(Resolve-Path . <# or wherever #>)" archive-wasm:/home/ubuntu/shared
    # multipass stop archive-wasm
  2. anonhostpi created this gist Sep 8, 2025.
    45 changes: 45 additions & 0 deletions cloud-init.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,45 @@
    # multipass launch --name archive-wasm --memory 6G --disk 20G --cloud-init $init --network "<your-network-adapter>"
    # multipass mount "$(Resolve-Path . <# or wherever #>)" archive-wasm:/home/ubuntu/shared
    # multipass stop archive-wasm
    # multipass start archive-wasm
    # multipass shell archive-wasm
    #
    # # Inside the VM:
    #
    # git clone https://github.com/anonhostpi/archive-wasm-pwsh
    # cd archive-wasm
    # ./wasm/build.sh
    package_update: true
    package_upgrade: true

    package_update: true
    package_upgrade: true

    groups:
    - docker

    system_info:
    default_user:
    groups: [ docker ]

    packages:
    - apt-transport-https
    - ca-certificates
    - curl
    - gnupg
    - lsb-release
    - unattended-upgrades
    - dos2unix
    - wabt

    runcmd:
    # Install Docker:
    - mkdir -p /etc/apt/keyrings
    - curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    - echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
    - apt-get update
    - apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
    - systemctl enable docker
    - systemctl start docker

    final_message: "🚀 libarchive wasm VM deployed!"