日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

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

發布時間:2023/12/31 编程问答 27 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【私有git】使用docker搭建gitlab-ce中文社区版服务器 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

環境

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中文社区版服务器的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。