标签:tag ports vim abs ber about rap gitlab安装 extern
#1、拉取镜像 [root@git ~]# docker pull gitlab/gitlab-ce [root@git ~]# docker images REPOSITORY TAG IMAGE ID CREATED SIZE gitlab/gitlab-ce latest 229b36075891 3 days ago 1.84GB #2、创建相关目录 [root@git ~]# mkdir -p /mnt/gitlab/etc [root@git ~]# mkdir -p /mnt/gitlab/log [root@git ~]# mkdir -p /mnt/gitlab/data #3、运行容器 [root@git ~]# docker run -d -p 443:443 -p 80:80 -p 222:22 --name gitlab --restart always -v /mnt/gitlab/etc:/etc/gitlab -v /mnt/gitlab/logs:/var/log/gitlab -v /mnt/gitlab/data:/var/opt/gitlab gitlab/gitlab-ce [root@git ~]# docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 3694c2292ed0 gitlab/gitlab-ce "/assets/wrapper" About a minute ago Up About a minute (health: starting) 0.0.0.0:80->80/tcp, 0.0.0.0:443->443/tcp, 0.0.0.0:222->22/tcp gitlab #4、配置gitlab [root@git ~]# vim /mnt/gitlab/etc/gitlab.rb external_url ‘http://192.168.11.10‘ # 配置http协议所使用的访问地址,不加端口号默认为80 #配置ssh协议所使用的访问地址和端口 gitlab_rails[‘gitlab_ssh_host‘] = ‘192.168.11.10‘ gitlab_rails[‘gitlab_shell_ssh_port‘] = 222 #5、重启容器 [root@git ~]# docker restart gitlab gitlab #6、访问测试
标签:tag ports vim abs ber about rap gitlab安装 extern
原文地址:https://www.cnblogs.com/hujinzhong/p/12192283.html