17 lines
501 B
Plaintext
17 lines
501 B
Plaintext
dserve() {
|
|
local container=dserve${$(pwd)//\//-}
|
|
(docker restart $container \
|
|
|| docker run -d --name $container -P -v "$(pwd):/usr/share/nginx/html:ro" nginx:stable-alpine) \
|
|
&& docker port $container
|
|
}
|
|
|
|
doc() {
|
|
# TODO: add zsh conf
|
|
# bind shell so we can change current dir (cd, etc)
|
|
docker run -it --rm -v "$HOME:/root" -v "/:/all" mhoush/zsh zsh -c "cd /all$(pwd) && $*"
|
|
}
|
|
|
|
sdoc() {
|
|
docker run -it --rm -v "$HOME:/root" -v "/:/all:ro" mhoush/zsh zsh -c "cd /all$(pwd) && $*"
|
|
}
|