feat: script for dev containers
This commit is contained in:
Executable
+22
@@ -0,0 +1,22 @@
|
||||
#!/bin/sh
|
||||
|
||||
base_path="~/projects/system/dev-env/scripts/"
|
||||
mount_path=$(pwd)
|
||||
if [[ -n "$2" ]]; then
|
||||
name=$2
|
||||
else
|
||||
name=$(pwd | rev | cut -d "/" -f 1 | rev)
|
||||
fi
|
||||
|
||||
echo "
|
||||
janishutz dev containers
|
||||
|
||||
-> Creating container $name <-
|
||||
"
|
||||
|
||||
if $1 == "rm"; then
|
||||
docker stop $name
|
||||
docker container rm $name
|
||||
else
|
||||
eval "${base_path}/$1-container $name $mount_path"
|
||||
fi
|
||||
Reference in New Issue
Block a user