作者:【吴业亮】
博客:https://wuyeliang.blog.csdn.net/
1、创建目录:
# mkdir -p /srv/gitlab/config
# mkdir -p /srv/gitlab/logs
# mkdir -p /srv/gitlab/data
2、启动容器
docker run --detach \
--hostname gitlab.example.com \
--publish 443:443 --publish 80:80 \
--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:11.11.0-ce.0
参数说明:
Local location |
Container location |
Usage |
/srv/gitlab/data |
/var/opt/gitlab |
For storing application data |
/srv/gitlab/logs |
/var/log/gitlab |
For storing logs |
/srv/gitlab/config |
/etc/gitlab |
For storing the GitLab configuration files |
4、故障排除
docker logs gitlab
5、登录web
http://<your-ip>
参考:
https://docs.gitlab.com/omnibus/docker/