feat: startup scripts now set hostnames

This commit is contained in:
2026-07-24 11:17:56 +02:00
parent c2c47eb9de
commit 64f3e2e437
7 changed files with 35 additions and 29 deletions
+6 -5
View File
@@ -1,17 +1,18 @@
#!/bin/sh
containername=$([[ $1 ]] && echo $1 || echo "devcontainer")
containermount=$([[ $2 ]] && echo $2 || echo "$HOME/projects/")
name=$([[ $1 ]] && echo $1 || echo "devcontainer")
mount=$([[ $2 ]] && echo $2 || echo "$HOME/projects/")
echo "
=> Mounting folder $containermount to /mnt (in container)
=> Mounting folder $mount to /mnt (in container)
=> Starting container
"
docker run -it \
-v $containermount:/mnt \
-v $mount:/mnt \
-v ~/.config/fish:/root/.config/fish \
-v ~/projects/system/dotfiles/scripts/:/root/projects/system/dotfiles \
--name $containername \
--name $name \
--hostname jh-dev-container-$name \
-w /mnt \
git.janishutz.com/registry/dev-container-base