feat: expose ports on node and vue containers
This commit is contained in:
@@ -3,9 +3,16 @@
|
|||||||
name=$([[ $1 ]] && echo $1 || echo "node")
|
name=$([[ $1 ]] && echo $1 || echo "node")
|
||||||
mount=$([[ $2 ]] && echo $2 || echo "$HOME/projects/")
|
mount=$([[ $2 ]] && echo $2 || echo "$HOME/projects/")
|
||||||
|
|
||||||
|
read -p "Port to expose (default = 8080) " port
|
||||||
|
|
||||||
|
if [[ $port == "" ]]; then
|
||||||
|
port=8080
|
||||||
|
fi
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
=> Mounting folder to /mnt (in container)
|
=> Mounting folder to /mnt (in container)
|
||||||
=> Starting container
|
=> Starting container
|
||||||
|
=> Port $port the same internally and externally
|
||||||
"
|
"
|
||||||
|
|
||||||
docker run -it \
|
docker run -it \
|
||||||
@@ -14,5 +21,6 @@ docker run -it \
|
|||||||
-v ~/projects/system/dotfiles/scripts/:/root/projects/system/dotfiles \
|
-v ~/projects/system/dotfiles/scripts/:/root/projects/system/dotfiles \
|
||||||
--name $name \
|
--name $name \
|
||||||
--hostname jh-dev-container-$name \
|
--hostname jh-dev-container-$name \
|
||||||
|
-p $port:$port \
|
||||||
-w /mnt \
|
-w /mnt \
|
||||||
git.janishutz.com/registry/dev-container-npm
|
git.janishutz.com/registry/dev-container-npm
|
||||||
|
|||||||
@@ -3,9 +3,16 @@
|
|||||||
name=$([[ $1 ]] && echo $1 || echo "vue")
|
name=$([[ $1 ]] && echo $1 || echo "vue")
|
||||||
mount=$([[ $2 ]] && echo $2 || echo "$HOME/projects/")
|
mount=$([[ $2 ]] && echo $2 || echo "$HOME/projects/")
|
||||||
|
|
||||||
|
read -p "Port to expose (default = 8081) " port
|
||||||
|
|
||||||
|
if [[ $port == "" ]]; then
|
||||||
|
port=8081
|
||||||
|
fi
|
||||||
|
|
||||||
echo "
|
echo "
|
||||||
=> Mounting folder to /mnt (in container)
|
=> Mounting folder to /mnt (in container)
|
||||||
=> Starting container
|
=> Starting container
|
||||||
|
=> Port $port the same internally and externally
|
||||||
"
|
"
|
||||||
|
|
||||||
docker run -it \
|
docker run -it \
|
||||||
@@ -14,5 +21,6 @@ docker run -it \
|
|||||||
-v ~/projects/system/dotfiles/scripts/:/root/projects/system/dotfiles \
|
-v ~/projects/system/dotfiles/scripts/:/root/projects/system/dotfiles \
|
||||||
--name $name \
|
--name $name \
|
||||||
--hostname jh-dev-container-$name \
|
--hostname jh-dev-container-$name \
|
||||||
|
-p $port:$port \
|
||||||
-w /mnt \
|
-w /mnt \
|
||||||
git.janishutz.com/registry/dev-container-vue
|
git.janishutz.com/registry/dev-container-vue
|
||||||
|
|||||||
Reference in New Issue
Block a user