From 9c52e2228d5d408645b49a264e16dc5943b12c8f Mon Sep 17 00:00:00 2001 From: Nicholas Rodrigues Lordello Date: Sat, 21 Mar 2026 21:15:01 +0100 Subject: Initial Container Creation We can now create and initialize a `dbx` container! --- README.md | 5 +++++ dbx | 29 +++++++++++++++++++++++++++++ dbx-create | 18 ++++++++++++++++++ dbx-init | 32 ++++++++++++++++++++++++++++++++ 4 files changed, 84 insertions(+) create mode 100644 README.md create mode 100755 dbx create mode 100755 dbx-create create mode 100755 dbx-init diff --git a/README.md b/README.md new file mode 100644 index 0000000..89efa6f --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Containerized Development Environments + +`dbx` is a set of scripts for managing a local containerized development environment. It works by creating a long-lived container named `dbx` with only access to a development root directory, where you can install various developer tools and dependencies without losing sleep at night. + +At its heart, it is extremely similar to Toolbx and Distrobox, but with as reduced permissions as possible for improved security. For example, unlike the aforementioned tools, `dbx` keeps SELinux enforcement; meaning that the `dbx` user cannot access other files if it manages to escape the namespace. In general, it does not try to create a convenient container that is seamlessly integrated with the host, but rather a restricted sandbox where you can install development tools. diff --git a/dbx b/dbx new file mode 100755 index 0000000..a5b7327 --- /dev/null +++ b/dbx @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +set -euo pipefail + +r="$HOME/.dbx" + +usage() { + cat <&2 +fi + +h=/dbx + +dnf install -y \ + fish \ + fzf \ + netcat \ + ripgrep \ + vim-enhanced + +if [[ ! -d $h ]]; then + usermod \ + --home $h \ + --groups wheel \ + --password "" \ + --shell $(command -v fish) \ + $(id -nu 1000) + + mkdir --parents $h + chown --recursive 1000:1000 $h +fi + +touch /run/.dbxenv +sleep infinity -- cgit v1.2.3