Skip to content

Commit 8c97835

Browse files
committed
Allow custom init + use trixie
1 parent c8b72f3 commit 8c97835

File tree

2 files changed

+53
-1
lines changed

2 files changed

+53
-1
lines changed

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debian:12-slim
1+
FROM debian:13-slim
22

33

44
# install useful packages
@@ -63,3 +63,6 @@ RUN set -eux \
6363
redis \
6464
sequel \
6565
;
66+
67+
# run all scripts in /etc/console/init/boot.d
68+
RUN test ! -d /etc/console/init/boot.d || find /etc/console/init/boot.d -maxdepth 1 -type f -exec bash {} \;

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,52 @@
11
# Console
22

33
Simple console container, useful as a dev pod.
4+
5+
To deploy in K8s, add the following manifest:
6+
7+
```yaml
8+
apiVersion: apps/v1
9+
kind: Pod
10+
metadata:
11+
name: console
12+
spec:
13+
containers:
14+
- name: console
15+
image: ghcr.io/bsm/console/console:latest
16+
imagePullPolicy: Always
17+
```
18+
19+
To execute custom commands at boot time you can include custom init scripts into a
20+
`ConfigMap`. For example:
21+
22+
```yaml
23+
---
24+
apiVersion: v1
25+
kind: ConfigMap
26+
metadata:
27+
name: special-config
28+
namespace: default
29+
data:
30+
10-nproc.sh: |
31+
#!/bin/bash
32+
33+
nproc > /tmp/NPROC
34+
---
35+
apiVersion: apps/v1
36+
kind: Pod
37+
metadata:
38+
name: console
39+
namespace: console
40+
spec:
41+
containers:
42+
- name: console
43+
image: ghcr.io/bsm/console/console:latest
44+
imagePullPolicy: Always
45+
volumeMounts:
46+
- mountPath: "/etc/console/init/boot.d"
47+
name: bootd
48+
volumes:
49+
- name: bootd
50+
configMap:
51+
name: console-boot
52+
```

0 commit comments

Comments
 (0)