【私有git】使用docker搭建gitlab-ce中文社区版服务器
生活随笔
收集整理的這篇文章主要介紹了
【私有git】使用docker搭建gitlab-ce中文社区版服务器
小編覺(jué)得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
環(huán)境
sudo usermod -aG docker 你的用戶名 newgrp - docker1.linux?
目標(biāo)
1.搭建gitlab-ce
2.如果有公網(wǎng)ip實(shí)現(xiàn)外網(wǎng)訪問(wèn)
3.使用vs code克隆倉(cāng)庫(kù)
步驟
首先我們先安裝dokcer服務(wù)
sudo apt update #更新apt源 sudo apt install docker.io #安裝docker安裝好后我們配置docker用戶組,以便你的用戶擁有docker的權(quán)限。
然后我們開(kāi)始拉取容器鏡像
docker search gitlab-ceNAME DESCRIPTION STARS OFFICIAL AUTOMATED gitlab/gitlab-ce GitLab Community Edition docker image based … 3697 [OK] twang2218/gitlab-ce-zh 漢化的 GitLab 社區(qū)版 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最新社區(qū)版10.1.0,omnibus二進(jìn)制包 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我們拉取下載量最多的中文社區(qū)版gitlab-ce
docker pull twang2218/gitlab-ce-zh然后我們運(yùn)行容器
docker run -p 8888:80 -i --name gitlab twang2218/gitlab-ce-zh假如你想將容器的80映射到80端口,就 -p 80:80?
然后等待服務(wù)運(yùn)行完成,大概要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...然后我們打開(kāi)此網(wǎng)頁(yè)
?遇到這個(gè)界面說(shuō)明還沒(méi)加載完,再等一下。
?好了以后會(huì)讓你填寫(xiě)root密碼
然后即可登陸
接下來(lái)如果你有公網(wǎng)ip又想要外網(wǎng)訪問(wèn)
我們打開(kāi)路由器(默認(rèn)你設(shè)置了橋街并且撥號(hào)上網(wǎng))
?并添加端口映射
將虛擬機(jī)映射到物理機(jī)的端口映射到外部。
比如一開(kāi)始的是8888:80 ,我就將8888端口映射出去即可。
然后使用ip:端口來(lái)進(jìn)行訪問(wèn)。
總結(jié)
以上是生活随笔為你收集整理的【私有git】使用docker搭建gitlab-ce中文社区版服务器的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 京东开普勒php接口,PHP调用京东联盟
- 下一篇: HTML——CSS样式优先级