feat: allow not binding port for node container

This commit is contained in:
2026-09-10 13:37:12 +02:00
parent d62292fcf8
commit 841a7dc0e2
+17 -2
View File
@@ -11,13 +11,27 @@ if [[ $port == "" ]]; then
port=8080
fi
echo "
if [[ $port == "none" ]]; then
echo "
=> Mounting folder to /mnt (in container)
=> Starting container (no bound ports)
"
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 \
-w /mnt \
git.janishutz.com/registry/dev-container-npm
else
echo "
=> Mounting folder to /mnt (in container)
=> Starting container
=> Port $port the same internally and externally
"
docker run -it \
docker run -it \
-v $mount:/mnt \
-v ~/.config/fish:/root/.config/fish \
-v ~/projects/system/dotfiles/scripts/:/root/projects/system/dotfiles \
@@ -26,3 +40,4 @@ docker run -it \
-p $port:$port \
-w /mnt \
git.janishutz.com/registry/dev-container-npm
fi