iptables -L -n
setenforce 0
yum install docker
systemctl daemon-reload
systemctl restart docker.service
docker search gitlab ## 查看目前官方镜像
docker pull gitlab/gitlab-ce:latest ## 下载最新镜像
docker images ## 查看已下载的镜像
docker network create gitlab_net # 创建docker网络
mkdir -p /home/lp/docker/gitlab/logs
mkdir -p /home/lp/docker/gitlab/config
mkdir -p /home/lp/docker/gitlab/data
chmod -R 777 /home/lp/docker/gitlab
docker run -d \
--net=gitlab_net \
--privileged=true \
-p 10443:443 \
-p 11110:80 \
-p 10022:22 \
--name gitlab \
-v /home/lp/docker/gitlab/config:/etc/gitlab \
-v /home/lp/docker/gitlab/logs:/var/log/gitlab \
-v /home/lp/docker/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
## gitlab 需要提权
- 登录gitlab, 访问http://$hostname:11110
支持的环境
- CentO7
- 运行时内存4G (占满)
- 镜像大小 1G