Skip to content

Commit cd98138

Browse files
committed
βš™ Add more apt configs
1 parent 73c51bc commit cd98138

14 files changed

Lines changed: 95 additions & 18 deletions

File tree

β€Ž.github/workflows/build.yamlβ€Ž

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
runs-on: ubuntu-latest
1313
if: github.actor != 'renovate[bot]' && github.actor != 'renovate[bot]'
1414
steps:
15-
- name: πŸ“ Checkout repository
16-
uses: actions/checkout@v4
15+
- name: πŸ“₯ Checkout repository
16+
uses: actions/checkout@v5
1717

1818
- name: 🧹 Lint
1919
uses: pre-commit/action@v3.0.1
@@ -29,8 +29,8 @@ jobs:
2929
packages: write
3030

3131
steps:
32-
- name: πŸ“ Checkout repository
33-
uses: actions/checkout@v4
32+
- name: πŸ“₯ Checkout repository
33+
uses: actions/checkout@v5
3434

3535
- uses: docker/setup-qemu-action@v3
3636
- uses: docker/setup-buildx-action@v3

β€ŽDockerfileβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ RUN DEBIAN_FRONTEND=noninteractive \
2626
"unzip (>=6.0)" \
2727
"wget (>=1.21)" \
2828
"zsh (>=5.9)" \
29-
&& rm -rf /var/lib/apt/lists/*
29+
&& /usr/libexec/kloudkit/apt-cleanup
3030

3131
### Add docker group and application user
3232
RUN groupadd \

β€ŽREADME.mdβ€Ž

Lines changed: 39 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,51 @@
1414
docker pull ghcr.io/kloudkit/base-image:latest
1515
```
1616

17-
Use it as the first `FROM` in any Kloudkit-compatible Dockerfile:
17+
Use it as the first `FROM` in any KloudKIT-compatible Dockerfile:
1818

1919
```dockerfile
2020
FROM ghcr.io/kloudkit/base-image:latest
2121
# …install your app here…
2222
```
2323

24+
## What's Inside
25+
26+
This ultra-minimal base layer provides:
27+
28+
- **Size-optimized Debian** with aggressive cleanup configurations.
29+
- **Essential tools** like `curl`, `wget`, `gnupg`, and `unzip` pre-installed.
30+
- **Smart package management** that blocks unnecessary services by default.
31+
- **Multi-version support** with opt-in access to newer Debian releases.
32+
- **Security hardening** with sensible defaults for container environments.
33+
- **User setup** with a non-root `kloud` user ready for your applications.
34+
35+
## Why Use This Base
36+
37+
- **Smaller images:** Extensive file exclusions and package filtering reduce bloat.
38+
- **Faster builds:**Common tools pre-installed, optimized APT configuration.
39+
- **Consistent foundation:** All KloudKIT projects start from the same reliable base.
40+
- **Flexible packaging:** Access to both stable and testing repositories when needed.
41+
- **Production ready:** Battle-tested configurations used across KloudKIT infrastructure.
42+
43+
## Getting Started
44+
45+
The base image includes everything needed for most containerized applications.
46+
Simply extend it with your application-specific requirements:
47+
48+
```dockerfile
49+
FROM ghcr.io/kloudkit/base-image:latest
50+
51+
# Install your application dependencies
52+
RUN apt-get update && apt-get install -y your-packages
53+
54+
# Copy and configure your application
55+
COPY . /app
56+
WORKDIR /app
57+
58+
# Switch to non-root user
59+
USER kloud
60+
```
61+
2462
## License
2563

2664
Released under the [**MIT License**](https://github.com/kloudkit/base-image/blob/main/LICENSE)
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
APT::Keep-Downloaded-Packages "false";
22

33
APT::Install-Recommends "false";
4+
APT::Install-Suggests "false";
45

56
Dpkg::Options {
67
"--force-confdef";
78
"--force-confold";
89
}
910

1011
Acquire::Languages "none";
12+
13+
Dir::Cache::srcpkgcache "";
14+
Dir::Cache::pkgcache "";
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Package: systemd-timesyncd ntp chrony
2+
Pin: release *
3+
Pin-Priority: -1
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Package: bluetooth avahi-daemon network-manager* wireless-*
2+
Pin: release *
3+
Pin-Priority: -1
File renamed without changes.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Package: postfix* exim4* sendmail* ssmtp mailutils* mutt*
2+
Pin: release *
3+
Pin-Priority: -1
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Package: anacron at
2+
Pin: release *
3+
Pin-Priority: -1
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
Package: cups* printer-driver-*
2+
Pin: release *
3+
Pin-Priority: -1

0 commit comments

Comments
Β (0)