Docker - 运行Gitlab服务
2019-01-07 本文已影响0人
红薯爱帅
1. gitlab
GitLab is the first single application for the entire DevOps lifecycle. Only GitLab enables Concurrent DevOps, unlocking organizations from the constraints of the toolchain. GitLab provides unmatched visibility, higher levels of efficiency, and comprehensive governance. This makes the software lifecycle 200% faster, radically improving the speed of business.
2. 启动docker容器
- 启动gitlab
docker run --detach \
--hostname gitlab.example.com \
--publish 443:443 --publish 80:80 --publish 22:22 \
--name gitlab \
--restart always \
--volume /srv/gitlab/config:/etc/gitlab \
--volume /srv/gitlab/logs:/var/log/gitlab \
--volume /srv/gitlab/data:/var/opt/gitlab \
gitlab/gitlab-ce:latest
- 本地追加host
127.0.0.1 gitlab.example.com
3. 测试
- 打开gitlab.example.com,配置root的密码
-
创建user、project、group等,并验证项目可用
image.png
4. 下一步
基于Gitlab完成CI/CD,后续再完善。
5. 参考
-
docker image gitlab/gitlab-ce
https://hub.docker.com/r/gitlab/gitlab-ce -
GitLab Docker images
https://docs.gitlab.com/ee/install/README.html#doc-nav
https://docs.gitlab.com/omnibus/docker/