1,准备一个服务器
2,登陆终端,进入到服务器
3,安装docker镜像,查看docker镜像(docker images)
4,gitlab-ce是社区版,开源、免费的
5,一条命令启动gitlab:
#!/bin/bash
HOST_NAME=gitlab.wfq.com
GITLAB_DIR=/home/wfq/gitlab
docker stop gitlab
docker rm gitlab
docker run -d
–hostname ${HOST_NAME}
-p 9443:443 -p 8089:80 -p 2222:22
–name gitlab
-v ${GITLAB_DIR}/config:/etc/gitlab
-v ${GITLAB_DIR}/logs:/var/log/gitlab
-v ${GITLAB_DIR}/data:/var/opt/gitlab
registry.cn-hangzhou.aliyuncs.com/imooc/gitlab-ce:latest
04-08
3095
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)