aboutsummaryrefslogtreecommitdiff
path: root/dbx-create
diff options
context:
space:
mode:
Diffstat (limited to 'dbx-create')
-rwxr-xr-xdbx-create45
1 files changed, 9 insertions, 36 deletions
diff --git a/dbx-create b/dbx-create
index 48b2633..18fb211 100755
--- a/dbx-create
+++ b/dbx-create
@@ -3,42 +3,15 @@
set -euo pipefail
-R="$(dirname "$(realpath "${BASH_SOURCE[0]}")")"
C="dbx"
-echo "TODO:"
-echo "- create temporary SSH key"
-echo "- generate SSH configuration for host and guest"
-echo "- create base container image"
-echo " - initialize user"
-echo " - add authorized keys for SSH login"
-echo " - install required packages (sshd and tini)"
-echo " - install nice to have packages (see toolbox image)"
-echo " - setup socket cleanup with sshd_config"
-echo "- magic encantation to create container"
+if ! container system status &>/dev/null; then
+ container system start
+fi
-#if ! id $DBX_USER &>/dev/null; then
-# useradd \
-# --comment "$DBX_USER_COMMENT" \
-# --create-home \
-# --groups sudo \
-# --shell /usr/bin/bash \
-# --uid 1000 \
-# --user-group \
-# $DBX_USER
-#fi
-# if container list --all | grep $C >/dev/null; then
-# echo "already created"
-# exit
-# fi
-# podman create \
-# --hostname dbx \
-# --label manager=dbx \
-# --name "$c" \
-# --user root:root \
-# --userns keep-id \
-# --volume "$d:$d:z" \
-# --volume "$r/dbx-init:/usr/local/bin/dbx-init:ro,z" \
-# registry.fedoraproject.org/fedora-toolbox:43 \
-# dbx-init "$(id -u)" "$(id -g)"
-# podman start "$c" >/dev/null
+if container list --all | grep $C >/dev/null; then
+ echo "already created"
+ exit
+fi
+
+container create --name $C --publish 4222:22 $C