diff options
Diffstat (limited to 'container')
| -rw-r--r-- | container/Containerfile | 43 | ||||
| -rwxr-xr-x | container/init | 23 | ||||
| -rwxr-xr-x | container/stop | 20 |
3 files changed, 0 insertions, 86 deletions
diff --git a/container/Containerfile b/container/Containerfile deleted file mode 100644 index 8aa03ec..0000000 --- a/container/Containerfile +++ /dev/null @@ -1,43 +0,0 @@ -FROM docker.io/library/debian:13 - -# Remove container-specific APT configurations, and install required packages -RUN rm /etc/apt/apt.conf.d/docker-* && \ - apt-get update && \ - apt-get install -y \ - bash-completion \ - bzip2 \ - curl \ - git \ - gnupg \ - htop \ - less \ - locales \ - man-db \ - manpages \ - nano \ - openssh-client \ - openssh-server \ - procps \ - sudo \ - tini \ - trash-cli \ - tree \ - vim \ - wget \ - zip \ - && \ - apt-get clean && \ - rm -dr /var/lib/apt/lists/* - -# Configure locale with UTF-8 support -RUN update-locale LANG=C.UTF-8 LC_ALL=C.UTF-8 - -# Configure SSH server -RUN echo "StreamLocalBindUnlink yes" >> /etc/ssh/sshd_config && \ - echo "AuthorizedKeysFile /etc/ssh/authorized_keys" >> /etc/ssh/sshd_config && \ - touch /etc/ssh/authorized_keys - -# Set up the init and stop -RUN mkdir -p /etc/dbx -COPY init stop /sbin -ENTRYPOINT ["/sbin/init"] diff --git a/container/init b/container/init deleted file mode 100755 index 3f17b48..0000000 --- a/container/init +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: GPL-3.0-only -# SPDX-FileCopyrightText: 2026 Nicholas Rodrigues Lordello <[email protected]> - -if [ "$(id -u)" -ne 0 ]; then - printf '%s: operation not permitted\n' "$0" >&2 - exit 1 -fi - -touch /run/.dbxenv -printf "%d\n" "$$" >/run/dbx.pid - -if [ -f /etc/dbx/init.local ] && [ -x /etc/dbx/init.local ]; then - /etc/dbx/init.local || - printf '%s: init.local failed (%d)\n' "$0" "$?" >&2 -fi - -# The init process is not guaranteed to be on PID 1 for all runtimes (notably, -# `krun` will wrap the init process). Tell tini to act like an init process -# regardless of its PID. -export TINI_SUBREAPER=yes - -exec /usr/bin/tini /usr/sbin/sshd -- -D -e diff --git a/container/stop b/container/stop deleted file mode 100755 index 9affb9c..0000000 --- a/container/stop +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -# SPDX-License-Identifier: GPL-3.0-only -# SPDX-FileCopyrightText: 2026 Nicholas Rodrigues Lordello <[email protected]> - -if [ "$(id -u)" -ne 0 ]; then - printf '%s: operation not permitted\n' "$0" >&2 - exit 1 -fi - -if [ -x /etc/dbx/stop.local ]; then - /etc/dbx/stop.local || - printf '%s: stop.local failed (%d)\n' "$0" "$?" >&2 -fi - -if ! pid="$(cat /run/dbx.pid)"; then - printf '%s: could not read init PID file, assuming 1\n' "$0" >&2 - pid=1 -fi -kill -TERM "$pid" || - printf '%s: could not stop init[%s] (%d)\n' "$0" "$pid" "$?" >&2 |
