3步基于docker搭建gitlab-ce

cat deploy_gitlab.sh

#1.拉取镜像
docker pull docker.io/gitlab/gitlab-ce 
#2.启动服务
docker run --name='gitlab-ce' -d \
       --hostname hostname \
       --publish 443:443 \
       --publish 1226:80 \
       --publish 23:22 \
       -p 80:80 \
       --restart always \
       --volume /home/gitlab/config:/etc/gitlab \
       --volume /home/gitlab/logs:/var/log/gitlab \
       --volume /home/gitlab/data:/var/opt/gitlab \
       gitlab/gitlab-ce

docker exec -ti gitlab-ce /bin/bash

gitlab-ctl reconfigure

测试:
http://localhost:9994

你可能感兴趣的:(持续交付与DevOps)