Skip to content

Commit 12e2044

Browse files
committed
🔧 Add matrix builds for Bookworm and Trixie variants
1 parent cd98138 commit 12e2044

3 files changed

Lines changed: 47 additions & 14 deletions

File tree

.github/workflows/build.yaml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,16 @@ jobs:
2424
needs:
2525
- lint
2626

27+
strategy:
28+
matrix:
29+
variant:
30+
- name: bookworm
31+
tag: 12.12
32+
latest: true
33+
- name: trixie
34+
tag: 13.1
35+
latest: false
36+
2737
permissions:
2838
contents: read
2939
packages: write
@@ -48,9 +58,11 @@ jobs:
4858
with:
4959
images: ghcr.io/${{ github.repository }}
5060
flavor: |
51-
latest=false
61+
latest=${{ matrix.variant.latest }}
62+
suffix=-${{ matrix.variant.name }},onlatest=true
5263
tags: |
53-
type=raw,value=latest
64+
type=raw,value=latest,enable=${{ matrix.variant.latest }}
65+
type=raw,value=${{ matrix.variant.name }}
5466
type=semver,pattern=v{{version}}
5567
type=semver,pattern=v{{major}}.{{minor}}
5668
@@ -60,6 +72,8 @@ jobs:
6072
env:
6173
DOCKER_BUILD_SUMMARY: true
6274
with:
75+
build-args: |
76+
tag=${{ matrix.variant.tag }}
6377
cache-from: type=gha
6478
cache-to: type=gha,mode=max
6579
context: .

Dockerfile

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,17 @@ COPY src/rootfs /
1616
### Install helper requirements
1717
RUN DEBIAN_FRONTEND=noninteractive \
1818
apt-get update \
19-
&& apt-get satisfy -y --no-install-recommends \
20-
"locales" \
19+
&& apt-get install -y --no-install-recommends \
20+
locales \
2121
&& locale-gen \
22-
&& apt-get satisfy -y --no-install-recommends \
23-
"ca-certificates (>=20230311)" \
24-
"curl (>=7.88)" \
25-
"gnupg (>=2.2)" \
26-
"unzip (>=6.0)" \
27-
"wget (>=1.21)" \
28-
"zsh (>=5.9)" \
22+
&& apt-get install -y --no-install-recommends \
23+
ca-certificates \
24+
curl \
25+
gnupg \
26+
unzip \
27+
wget \
28+
xz-utils \
29+
zsh \
2930
&& /usr/libexec/kloudkit/apt-cleanup
3031

3132
### Add docker group and application user

README.md

Lines changed: 21 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,22 @@
1010
---
1111

1212
```sh
13-
# TL;DR 🐳 grab the latest layer
13+
# TL;DR 🐳 grab the latest layer (Bookworm by default)
1414
docker pull ghcr.io/kloudkit/base-image:latest
15+
16+
# Or choose a specific Debian version
17+
docker pull ghcr.io/kloudkit/base-image:bookworm # Debian 12
18+
docker pull ghcr.io/kloudkit/base-image:trixie # Debian 13
1519
```
1620

1721
Use it as the first `FROM` in any KloudKIT-compatible Dockerfile:
1822

1923
```dockerfile
2024
FROM ghcr.io/kloudkit/base-image:latest
2125
# …install your app here…
26+
27+
# Or target a specific version
28+
FROM ghcr.io/kloudkit/base-image:bookworm
2229
```
2330

2431
## What's Inside
@@ -28,7 +35,7 @@ This ultra-minimal base layer provides:
2835
- **Size-optimized Debian** with aggressive cleanup configurations.
2936
- **Essential tools** like `curl`, `wget`, `gnupg`, and `unzip` pre-installed.
3037
- **Smart package management** that blocks unnecessary services by default.
31-
- **Multi-version support** with opt-in access to newer Debian releases.
38+
- **Multiple Debian versions** with dedicated Bookworm and Trixie variants.
3239
- **Security hardening** with sensible defaults for container environments.
3340
- **User setup** with a non-root `kloud` user ready for your applications.
3441

@@ -37,9 +44,20 @@ This ultra-minimal base layer provides:
3744
- **Smaller images:** Extensive file exclusions and package filtering reduce bloat.
3845
- **Faster builds:**Common tools pre-installed, optimized APT configuration.
3946
- **Consistent foundation:** All KloudKIT projects start from the same reliable base.
40-
- **Flexible packaging:** Access to both stable and testing repositories when needed.
47+
- **Version flexibility:** Choose between stable Bookworm or newer Trixie variants.
4148
- **Production ready:** Battle-tested configurations used across KloudKIT infrastructure.
4249

50+
## Available Tags
51+
52+
| Tag | Debian Version | Description |
53+
| ----------------- | --------------- | ----------------------------------- |
54+
| `latest` | 12 *(Bookworm)* | Default, stable release |
55+
| `bookworm` | 12 *(Bookworm)* | Explicit stable version |
56+
| `trixie` | 13 *(Trixie)* | Testing release with newer packages |
57+
| `v0.0.1` | 12 *(Bookworm)* | Versioned stable release |
58+
| `v0.0.1-bookworm` | 12 *(Bookworm)* | Versioned Bookworm variant |
59+
| `v0.0.1-trixie` | 13 *(Trixie)* | Versioned Trixie variant |
60+
4361
## Getting Started
4462

4563
The base image includes everything needed for most containerized applications.

0 commit comments

Comments
 (0)