Building

Examples to build with Luet

Simple package build

Creating and building a simple package:

$> mkdir package

$> cat <<EOF > package/build.yaml
image: busybox
steps:
- echo "foo" > /foo
EOF

$> cat <<EOF > package/definition.yaml
name: "foo"
version: "0.1"
EOF

$> luet build --all

πŸ“¦  Selecting  foo 0.1
πŸ“¦  Compiling foo version 0.1 .... β˜•
πŸ‹  Downloading image luet/cache-foo-bar-0.1-builder
πŸ‹  Downloading image luet/cache-foo-bar-0.1
πŸ“¦   foo Generating πŸ‹  definition for builder image from busybox
πŸ‹  Building image luet/cache-foo-bar-0.1-builder
πŸ‹  Building image luet/cache-foo-bar-0.1-builder done
 Sending build context to Docker daemon  4.096kB
 ...

Build packages

In order to build a specific version, a full package definition (triple of category, name and version) has to be specified. In this example we will also enable package compression (gzip).

$> mkdir package

$> cat <<EOF > package/build.yaml
image: busybox
steps:
- echo "foo" > /foo
EOF

$> cat <<EOF > package/definition.yaml
name: "foo"
version: "0.1"
category: "bar"
EOF

$> luet build bar/foo-0.1 --compression gzip

πŸ“¦  Selecting  foo 0.1
πŸ“¦  Compiling foo version 0.1 .... β˜•
πŸ‹  Downloading image luet/cache-foo-bar-0.1-builder
πŸ‹  Downloading image luet/cache-foo-bar-0.1
πŸ“¦   foo Generating πŸ‹  definition for builder image from busybox
πŸ‹  Building image luet/cache-foo-bar-0.1-builder
πŸ‹  Building image luet/cache-foo-bar-0.1-builder done
 Sending build context to Docker daemon  4.096kB
 ...


Last modified August 1, 2024: fix(ci): rename goreleaser flag (7b70305)