Files
dev-env/scripts/base-container
T
2026-08-19 14:07:08 +02:00

24 lines
520 B
Bash
Executable File

#!/bin/sh
name=$([[ $1 ]] && echo $1 || echo "devcontainer")
mount=$([[ $2 ]] && echo $2 || echo "$HOME/projects/")
echo "
=> Mounting folder $mount to /mnt (in container)
=> Starting container
"
userid=$(id -u)
usergroup=$(id -g)
docker run -it \
-v $mount:/mnt \
-v ~/.config/fish:/root/.config/fish \
-v ~/projects/system/dotfiles/scripts/:/root/projects/system/dotfiles \
--name $name \
--hostname jh-dev-container-$name \
-u $userid:$usergroup \
-w /mnt \
git.janishutz.com/registry/dev-container-base