if [ ! -n $RUNNING ]; then echo "$CONTAINER does not exit" return 1 fi
if [ "$RUNNING" == "false" ]; then echo "$CONTAINER is not running." return 2 else echo "$CONTAINER is running" #delete same name container matchingStarted=$(docker ps --filter="name=$CONTAINER" -q | xargs) if [ -n $matchingStarted ]; then docker stop $matchingStarted fi matching=$(docker ps -a --filter="name=$CONTAINER" -q | xargs) if [ -n $matching ]; then docker rm $matching fi fi
echo "RUNNING IS ${RUNNING}"
# 运行镜像 docker run -itd --name $CONTAINER -p $PORT:10083 ${image_name}:${tag}
deploy: type:git repo:<repositoryurl> branch:[branch] token:'' message:[message] name:[gituser] email:[gitemail] extend_dirs:[extenddirectory] ignore_hidden:false# default is true ignore_pattern:regexp# whatever file that matches the regexp will be ignored when deploying
web: image:'gitlab/gitlab-ce:latest' restart:always hostname:'gitlab.example.com' environment: GITLAB_OMNIBUS_CONFIG:| external_url'https://gitlab.example.com' # Add any other gitlab.rb configuration here, each on its own line ports: -'80:80' -'443:443' -'22:22' volumes: -'$GITLAB_HOME/gitlab/config:/etc/gitlab' -'$GITLAB_HOME/gitlab/logs:/var/log/gitlab' -'$GITLAB_HOME/gitlab/data:/var/opt/gitlab'