mirror of
https://github.com/harish2704/dotFiles.git
synced 2026-09-10 07:11:09 +00:00
Added cli to quickly run any linux distro as container
This commit is contained in:
@@ -12,6 +12,16 @@ list-commands(){
|
|||||||
typeset -F | cut -d ' ' -f 3 | grep -v '^_' | sort
|
typeset -F | cut -d ' ' -f 3 | grep -v '^_' | sort
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# dockerLinux [imagename=ubuntu:22.40] . Quick shell inside given linux container
|
||||||
|
dockerLinux(){
|
||||||
|
set -x
|
||||||
|
local cid=$(($RANDOM%20))
|
||||||
|
local name=linux_$cid
|
||||||
|
local image=${1:-ubuntu:22.04}
|
||||||
|
docker run -d --name $name $image sh -c "trap : TERM INT; sleep infinity & wait"
|
||||||
|
docker exec -it $name sh
|
||||||
|
}
|
||||||
|
|
||||||
# ts / tsx to js/jsx
|
# ts / tsx to js/jsx
|
||||||
tstojs(){
|
tstojs(){
|
||||||
set -x
|
set -x
|
||||||
|
|||||||
Reference in New Issue
Block a user