1 Star 0 Fork 0

mengzi / 12306

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
docker.sh 593 Bytes
一键复制 编辑 原始数据 按行查看 历史
tan 提交于 2019-01-10 11:18 . add docker.sh logs function
#!/bin/bash
#author: tan
#date: 2019-01-07
# a script to control docker's container create restart reload and rm function
function checkSudo (){
if [ $UID -ne 0 ];then
echo -e 'it must be root!'
echo -e 'usage ./docker.sh {run|restart|rm|logs}'
exit 1
fi
}
checkSudo
if [ $# -eq 1 ];then
case $1 in
"run")
docker-compose up;;
"restart")
docker-compose up --no-recreate;;
"rm")
docker-compose rm -f;;
"drun")
docker-compose up -d;;
"logs")
docker-compose logs;;
*)
echo -e 'usage ./docker.sh {run|restart|rm|logs}';;
esac
fi
Python
1
https://gitee.com/mengzi123/my12306.git
git@gitee.com:mengzi123/my12306.git
mengzi123
my12306
12306
master

搜索帮助