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
...
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.
Last modified August 1, 2024: fix(ci): rename goreleaser flag (7b70305)