环境

sudo usermod -aG docker 你的用户名
newgrp - docker

1.linux

目标

1.搭建gitlab-ce

2.如果有公网ip实现外网访问

3.使用vs code克隆仓库

步骤

首先我们先安装dokcer服务

sudo apt update   #更新apt源
sudo apt install docker.io   #安装docker

安装好后我们配置docker用户组,以便你的用户拥有docker的权限。

然后我们开始拉取容器镜像

docker search gitlab-ceNAME                                     DESCRIPTION                                     STARS     OFFICIAL   AUTOMATED
gitlab/gitlab-ce                         GitLab Community Edition docker image based …   3697                 [OK]
twang2218/gitlab-ce-zh                   汉化的 GitLab 社区版 Docker Image                     258                  [OK]
beginor/gitlab-ce                        GitLab Community Edition with zh-cn             72                   [OK]
yrzr/gitlab-ce-arm64v8                   GitLab Community Edition docker image for ar…   43
drud/gitlab-ce                                                                           13
gitlab/gitlab-ce-qa                      GitLab QA has a test suite that allows end-t…   8
polinux/gitlab-ce                        GitLab-CE on Steroids (Extra features - see …   3                    [OK]
marq/gitlab-ce-subgit                    A GitLab container with SubGit included.        3                    [OK]
slpcat/gitlab-ce                         gitlab-ce最新社区版10.1.0,omnibus二进制包                3
lizhenliang/gitlab-ce-zh                                                                 2
computersciencehouse/gitlab-ce-oidc      GitLab CE Docker image with OpenID Connect s…   1                    [OK]
projectatomic/gitlab-centos7-atomicapp   Gitlab Atomic App                               1                    [OK]
idoall/gitlab-ce                         gitlab-ce                                       1                    [OK]
lezapedrola/gitlab-ce                                                                    0
toshi0123/gitlab-ce                      gitlab-ce based on alpine linux                 0                    [OK]
sstruss/gitlab-ce-armhf                  gitlab-ce armhf image for armv7/armhf platfo…   0
visitsb/gitlab-ce                        Fixes official https://hub.docker.com/r/gitl…   0
oidatiftla/gitlab-ce                     Mirror of gitlab/gitlab-ce with more tags (m…   0
jbuncle/gitlab-ce                                                                        0
visualon/gitlab-ce                       customized gitlab-ce docker image               0
chefplatform/gitlab-ce-kitchen           Docker image based on gitlab/gitlab-ce provi…   0
imachineml/gitlab-ce                                                                     0
ragboy/gitlab-ce                         gitlab-ce 8.4.2                                 0
mjvdende/gitlab-ce                       gitlab-ce pimped with latest postgresql-clie…   0                    [OK]
feeditout/gitlab-ce                                                                      0                    

我们拉取下载量最多的中文社区版gitlab-ce

docker pull twang2218/gitlab-ce-zh 

然后我们运行容器

docker run -p 8888:80 -i --name gitlab twang2218/gitlab-ce-zh  

假如你想将容器的80映射到80端口,就 -p 80:80

然后等待服务运行完成,大概要1分钟

> worker=6
I, [2022-09-11T15:51:30.358128 #653]  INFO -- : reaped #<Process::Status: pid 837 exit 0> worker=7
I, [2022-09-11T15:51:30.358191 #653]  INFO -- : reaped #<Process::Status: pid 2413 exit 0> worker=8
I, [2022-09-11T15:51:30.358285 #653]  INFO -- : reaped #<Process::Status: pid 3170 exit 0> worker=2
I, [2022-09-11T15:51:30.358381 #653]  INFO -- : master complete==> /var/log/gitlab/unicorn/current <==
2022-09-11_15:51:31.26116 forwarding CONT to unicorn master 653
2022-09-11_15:51:31.26126 /opt/gitlab/embedded/bin/gitlab-unicorn-wrapper: line 132: kill: (653) - No such process
2022-09-11_15:51:31.26129 wrapper for unicorn master 653 exiting
ok: down: unicorn: 0s, normally up
Thank you for using GitLab Docker Image!
Current version: gitlab-ce=11.1.4-ce.0Configure GitLab for your system by editing /etc/gitlab/gitlab.rb file
And restart this container to reload settings.
To do it use docker exec:docker exec -it gitlab vim /etc/gitlab/gitlab.rbdocker restart gitlabFor a comprehensive list of configuration options please see the Omnibus GitLab readme
https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/README.mdIf this container fails to start due to permission problems try to fix it by executing:docker exec -it gitlab update-permissionsdocker restart gitlabPreparing services...
Starting services...
Configuring GitLab package...
/opt/gitlab/embedded/bin/runsvdir-start: line 37: /proc/sys/fs/file-max: Read-only file system
gitlab preinstall:
gitlab preinstall: This node does not appear to be running a database
gitlab preinstall: Skipping version check, if you think this is an error exit now
gitlab preinstall:
Configuring GitLab...

然后我们打开此网页

遇到这个界面说明还没加载完,再等一下。

好了以后会让你填写root密码

然后即可登陆

接下来如果你有公网ip又想要外网访问

我们打开路由器(默认你设置了桥街并且拨号上网)

并添加端口映射

将虚拟机映射到物理机的端口映射到外部。

比如一开始的是8888:80 ,我就将8888端口映射出去即可。

然后使用ip:端口来进行访问。

【私有git】使用docker搭建gitlab-ce中文社区版服务器相关推荐

  1. gitlab使用_如何在正确使用 Docker 搭建 GitLab

    很多程序员在内网搭建 gitlab 都搭建的坑坑洼洼,不支持 https,或者装个 gitlab 就把服务器弄得乱七八糟的,根本不知道该怎么维护和迁移.还有程序员再用最原始的,远程机器上: git - ...

  2. docker搭建gitlab

    docker搭建gitlab 在服务器上直接安装gitlab,会装入Git,Redis ,postgresql,nginx等.如果主机已有redis.nginx等,配置会比较麻烦.而且以后gitlab ...

  3. 基于Docker搭建Gitlab代码存储

    关于Docker搭建Gitlab,在19年时就已经在博客发过文章了,今天重新回顾一下. 1.拉取镜像 docker pull gitlab/gitlab-ce 默认拉取最新版本: 2.创建Gitlab ...

  4. Docker搭建 Gitlab CI Runner

    文章目录 Docker搭建 Gitlab CI Runner 拉取 gitlab-runner 镜像 启动 gitlab-runner容器 注册runner 定义项目构建流程 获取日志 停止并删除现有 ...

  5. 使用docker搭建gitlab服务器

    使用docker搭建gitlab服务器 一.查看当前dokcer环境 二.安装docker-compose 三.编辑yaml文件 1.创建目录及yaml文件 2.编辑ymal文件 四.生成自签名证书文 ...

  6. GitLab企业版和社区版的功能对比

    http://www.shcsinfo.com/china/git_features.html#compare GITLAB社区版 功能丰富: 包括Git仓库管理.代码审查.问题跟踪.动态订阅.wik ...

  7. 一台服务器装两个sql server_搭建我的世界基岩版服务器

    hi~ 吃瓜朋友们大家好! 我们又见面了~ 这期水文, 啊不,推文, 咱们来点好玩的, 搭建我的世界基岩版服务器, 一个, 一看就会,一做就废的小教程 好了, 话不多说,干就完啦,奥利给! 准备工作: ...

  8. 使用docker搭建gitlab版本控制系统

    1. GitLab 简介 GitLab 是一款基于 git 的开源代码仓库系统  GitLab 与著名的 GitHub 最大的区别就是:  允许我们搭建自己的 git 代码私有仓库,非常方便 2.安装 ...

  9. docker搭建gitlab服务器(Centos7)

    系统环境:CentOS Linux release 7.6.1810 (Core) git版本:gitlab/gitlab-ce 一.安装和启动docker 见HTTPRUNNERMANAGER安装部 ...

最新文章

  1. tcp校验和计算校验和例子_浅谈TCP协议,总算明白它是干什么的了
  2. 含有“外骨骼”的电影和游戏
  3. poj2104(划分树模板)
  4. 云服务器与传统服务器的优势差异
  5. PLSQL 安装+配置( Oracle数据库连接工具 )
  6. MTK驱动(75)--- MT6739平台的thermal高温充电机制调整
  7. 我在阿里云玩蟹科技分享篇
  8. Linux入门:usermod - 修改用户帐户信息
  9. 如何消除选定TextBox后的光标但又不失去焦点。
  10. Git教程——为什么要掌握Git以及Git的安装
  11. 基于微信小程序的学生活动管理系统的设计与实现
  12. 37、T5L迪文屏C51开发之绘制2D形状
  13. 电脑文件管理——XYplorer
  14. 7E3 Banding
  15. lopa分析_AQ/T 3054-2015保护层分析(LOPA)方法应用导则
  16. 公务员考试计算机专业类别,专业!公务员专业类别划分
  17. shell之cut命令
  18. win10右键新建为什么没有文本文档了
  19. ​【原创】基于SSM的校园二手物品交易商城(毕业设计源代码)
  20. 测试wi-fi信号软件是什么,3个免费Wi-Fi实用软件 检测安全查信号

热门文章

  1. obs录制成mp4格式
  2. 爆肝十小时,为你总结出最全的数据大屏适配屏幕方案
  3. 神器PanDownload没了,还能用什么?
  4. 四极定子外充、测试夹具的设计
  5. 【19调剂】湖南大学信息科学与工程学院2019年硕士研究生调剂通知(校内)
  6. 转载:中国这10家慕课网站,您需要知道!
  7. python合并多个excel代码_python如何实现excel多表合并(附代码)
  8. Python基础(六)—函数式编程(内部函数、闭包、lambda、filter/map/reduce/sorce、偏函数)
  9. python百度翻译urllib_python爬虫入门--用urllib实现百度翻译-Go语言中文社区
  10. js/jq获取复选框的选中值