Skip to content

Commit 8200002

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

3 files changed

Lines changed: 56 additions & 18 deletions

File tree

.github/workflows/build.yaml

Lines changed: 18 additions & 3 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
@@ -50,16 +60,21 @@ jobs:
5060
flavor: |
5161
latest=false
5262
tags: |
53-
type=raw,value=latest
54-
type=semver,pattern=v{{version}}
55-
type=semver,pattern=v{{major}}.{{minor}}
63+
type=raw,value=latest,enable=${{ matrix.variant.latest }}
64+
type=raw,value=${{ matrix.variant.name }}
65+
type=semver,pattern=v{{version}},enable=${{ matrix.variant.latest }}
66+
type=semver,pattern=v{{major}}.{{minor}},enable=${{ matrix.variant.latest }}
67+
type=semver,pattern=v{{version}}-${{ matrix.variant.name }}
68+
type=semver,pattern=v{{major}}.{{minor}}-${{ matrix.variant.name }}
5669
5770
- name: 🐳 Docker Build & Push
5871
uses: docker/build-push-action@v6
5972
id: docker_build
6073
env:
6174
DOCKER_BUILD_SUMMARY: true
6275
with:
76+
build-args: |
77+
tag=${{ matrix.variant.tag }}
6378
cache-from: type=gha
6479
cache-to: type=gha,mode=max
6580
context: .

Dockerfile

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
ARG tag=12.11
1+
ARG tag
22

33
################################## Base Layer ##################################
44

@@ -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: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,22 +3,29 @@
33
> 📦 **Minimal Debian layer** that underpins *every* KloudKIT container
44
55
[![Stars](https://img.shields.io/github/stars/kloudkit/base-image?style=for-the-badge&logo=git&logoColor=c6d0f5&labelColor=414559&color=f0c6c6)](https://github.com/kloudkit/base-image/stargazers)
6-
[![Docker](https://img.shields.io/badge/latest-a?style=for-the-badge&logo=docker&logoColor=c6d0f5&label=docker&labelColor=414559&color=ef9f76)](https://github.com/kloudkit/base-image/pkgs/container/base-image)
6+
[![Docker](https://img.shields.io/badge/v0.0.3-a?style=for-the-badge&logo=docker&logoColor=c6d0f5&label=docker&labelColor=414559&color=ef9f76)](https://github.com/kloudkit/base-image/pkgs/container/base-image)
77
[![Build](https://img.shields.io/github/actions/workflow/status/kloudkit/base-image/build.yaml?style=for-the-badge&logo=githubactions&logoColor=c6d0f5&label=build&labelColor=414559&color=a6da95)](https://github.com/kloudkit/base-image/actions/workflows/build.yaml)
88
[![License](https://img.shields.io/github/license/kloudkit/base-image?style=for-the-badge&logo=opensourceinitiative&logoColor=c6d0f5&labelColor=414559&color=8caaee)](https://github.com/kloudkit/base-image/blob/main/LICENSE)
99

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,18 +35,33 @@ 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.
39+
- **Multi-architecture support** with ARM64 and AMD64 builds for broad compatibility.
3240
- **Security hardening** with sensible defaults for container environments.
3341
- **User setup** with a non-root `kloud` user ready for your applications.
3442

3543
## Why Use This Base
3644

3745
- **Smaller images:** Extensive file exclusions and package filtering reduce bloat.
38-
- **Faster builds:**Common tools pre-installed, optimized APT configuration.
46+
- **Faster builds:** Common tools pre-installed, optimized APT configuration.
3947
- **Consistent foundation:** All KloudKIT projects start from the same reliable base.
40-
- **Flexible packaging:** Access to both stable and testing repositories when needed.
48+
- **Version flexibility:** Choose between stable Bookworm or newer Trixie variants.
4149
- **Production ready:** Battle-tested configurations used across KloudKIT infrastructure.
4250

51+
## Available Tags
52+
53+
| Tag | Debian Version | Description |
54+
| ----------------- | --------------- | -------------------------------------- |
55+
| `latest` | 12 *(Bookworm)* | Default, stable release |
56+
| `bookworm` | 12 *(Bookworm)* | Explicit stable version |
57+
| `trixie` | 13 *(Trixie)* | Testing release with newer packages |
58+
| `v0.0.3` | 12 *(Bookworm)* | Versioned stable release (latest) |
59+
| `v0.0` | 12 *(Bookworm)* | Major.minor versioned release (latest) |
60+
| `v0.0.3-bookworm` | 12 *(Bookworm)* | Versioned Bookworm variant |
61+
| `v0.0.3-trixie` | 13 *(Trixie)* | Versioned Trixie variant |
62+
| `v0.0-bookworm` | 12 *(Bookworm)* | Major.minor Bookworm variant |
63+
| `v0.0-trixie` | 13 *(Trixie)* | Major.minor Trixie variant |
64+
4365
## Getting Started
4466

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

0 commit comments

Comments
 (0)