Skip to content

Instantly share code, notes, and snippets.

@smoser
Created May 16, 2024 13:46
Show Gist options
  • Save smoser/35c6cd11e805fbc2b9e3f2dbfa087b1a to your computer and use it in GitHub Desktop.
Save smoser/35c6cd11e805fbc2b9e3f2dbfa087b1a to your computer and use it in GitHub Desktop.
hello world simple melange yaml

This is a simple melange package file. It builds really quickly.

Build it in wolfi-dev/os with:

make hello-busybox

Build it directly with melange as:

melange build ./hello-busybox.yaml \
    --arch=x86_64 -k https://packages.wolfi.dev/os/wolfi-signing.rsa.pub -r https://packages.wolfi.dev/os
package:
name: hello-busybox
version: 1
epoch: 0
description: Say hello with busybox
copyright:
- license: Apache-2.0
environment:
contents:
packages:
- busybox
pipeline:
- runs: |
d="${{targets.destdir}}/usr/bin"
f="$d/${{package.name}}"
mkdir -p "$d"
cat > "$f" <<"EOF"
#!/bin/busybox sh
echo "hello ${1-world}"
EOF
chmod 755 "$f"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment