mirror of
https://github.com/mudler/luet.git
synced 2025-09-03 08:14:46 +00:00
1.7 KiB
1.7 KiB
title, linkTitle, weight, description
title | linkTitle | weight | description |
---|---|---|---|
Building | Building | 4 | 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
...