Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM debian:12-slim
FROM debian:13-slim


# install useful packages
Expand Down Expand Up @@ -51,10 +51,8 @@ RUN set -eux; \
echo 'gem: --no-document' >> /usr/local/etc/gemrc

# install useful ruby gems
RUN set -eux \
RUN set -eux; \
\
gem update --system \
; \
gem install -N \
bundler \
http \
Expand All @@ -63,3 +61,7 @@ RUN set -eux \
redis \
sequel \
;

# run all scripts in /etc/console/init/boot.d
RUN set -eux; \
test ! -d /etc/console/init/boot.d || find /etc/console/init/boot.d -maxdepth 1 -type f -exec bash {} \;
49 changes: 49 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
# Console

Simple console container, useful as a dev pod.

To deploy in K8s, add the following manifest:

```yaml
apiVersion: apps/v1
kind: Pod
metadata:
name: console
spec:
containers:
- name: console
image: ghcr.io/bsm/console/console:latest
imagePullPolicy: Always
```

To execute custom commands at boot time you can include custom init scripts into a
`ConfigMap`. For example:

```yaml
---
apiVersion: v1
kind: ConfigMap
metadata:
name: special-config
namespace: default
data:
10-nproc.sh: |
#!/bin/bash

nproc > /tmp/NPROC
---
apiVersion: apps/v1
kind: Pod
metadata:
name: console
namespace: console
spec:
containers:
- name: console
image: ghcr.io/bsm/console/console:latest
imagePullPolicy: Always
volumeMounts:
- mountPath: "/etc/console/init/boot.d"
name: bootd
volumes:
- name: bootd
configMap:
name: console-boot
```
Loading