码迷,mamicode.com
首页 > 其他好文 > 详细

Docker部署自己的GitLab

时间:2020-05-08 13:16:34      阅读:60      评论:0      收藏:0      [点我收藏+]

标签:log   pos   apply   config   windows   linux   cal   random   vol   

docker pull gitlab/gitlab-ce

docker run -it -p8443:443 -p8080:80 -p2222:22 --name gitlab  gitlab/gitlab-ce

http://localhost:8080/   设置root密码

 

其电脑可用IP进行克隆

git clone http://172.20.161.49:8080/root/joint.git

 

------分割线-------

Windows下映射目录没成功,应该是目录权限问题,以后再研究:

docker run -it -p8443:443 -p8080:80 -p2222:22 --name gitlab -v /d/gitlab/config:/etc/gitlab -v /d/gitlab/logs:/var/log/gitlab -v /d/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce

 

Linux下映射目录应该没问题:

--volume /home/brian/gitlab/config:/etc/gitlab
--volume /home/brian/gitlab/logs:/var/log/gitlab
--volume /home/brian/gitlab/data:/var/opt/gitlab

docker run --help

-d, --detach Run container in background and
print container ID

-p, --publish list Publish a containers port(s) to
the host
-P, --publish-all Publish all exposed ports to
random ports
--restart string Restart policy to apply when a
container exits (default "no")

--restart always

参考:
https://www.imooc.com/article/49032

Docker部署自己的GitLab

标签:log   pos   apply   config   windows   linux   cal   random   vol   

原文地址:https://www.cnblogs.com/v5captain/p/12849708.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!