本篇內(nèi)容介紹了“怎么搭建docker-gitlab-jenkins”的有關(guān)知識(shí),在實(shí)際案例的操作過(guò)程中,不少人都會(huì)遇到這樣的困境,接下來(lái)就讓小編帶領(lǐng)大家學(xué)習(xí)一下如何處理這些情況吧!希望大家仔細(xì)閱讀,能夠?qū)W有所成!
成都創(chuàng)新互聯(lián)-專業(yè)網(wǎng)站定制、快速模板網(wǎng)站建設(shè)、高性價(jià)比卡若網(wǎng)站開(kāi)發(fā)、企業(yè)建站全套包干低至880元,成熟完善的模板庫(kù),直接使用。一站式卡若網(wǎng)站制作公司更省心,省錢(qián),快速模板網(wǎng)站建設(shè)找我們,業(yè)務(wù)覆蓋卡若地區(qū)。費(fèi)用合理售后完善,10年實(shí)體公司更值得信賴。
yum -y install docker-io systemctl enable docker service docker start docker images
進(jìn)入阿里云后臺(tái)
進(jìn)入"容器鏡像服務(wù)"
進(jìn)入"鏡像加速"
查看"加速器地址": https://q2n4xzh2.mirror.aliyuncs.com
# vim /etc/docker/daemon.json { "registry-mirrors": ["https://q2n4xzh2.mirror.aliyuncs.com"] }
systemctl daemon-reload service docker restart
mkdir -p /data/gitlab
docker run --detach \ --hostname gitlab \ --publish 1443:443 --publish 1222:22 \ --name gitlab \ --restart always \ --volume /data/gitlab/config:/etc/gitlab \ --volume /data/gitlab/logs:/var/log/gitlab \ --volume /data/gitlab/data:/var/opt/gitlab \ gitlab/gitlab-ce:latest
mkdir -p /data/gitlab/config/ssl cp /usr/local/openresty/nginx/conf/cert/code.weflys.com.* /data/gitlab/config/ssl/
# vim /data/gitlab/config/gitlab.rb external_url 'https://code.weflys.com' nginx['redirect_http_to_https'] = true nginx['ssl_certificate'] = "/etc/gitlab/ssl/code.weflys.com.pem" nginx['ssl_certificate_key'] = "/etc/gitlab/ssl/code.weflys.com.key" gitlab_rails['gitlab_shell_ssh_port'] = 1222
說(shuō)明:阿里云需要開(kāi)放1222端口
docker cp /etc/timezone gitlab:/etc/timezone docker cp /usr/share/zoneinfo/Asia/Shanghai gitlab:/etc/localtime
docker restart gitlab
docker logs -f gitlab
等待 gitlab 啟動(dòng)成功
server { listen 80; server_name code.weflys.com; rewrite ^(.*)$ https://$host$1 permanent; } server { listen 443 ssl; server_name code.weflys.com; root html; index index.html; ssl_certificate cert/code.weflys.com.pem; ssl_certificate_key cert/code.weflys.com.key; ssl_session_timeout 5m; ssl_ciphers ECDHE-RSA-AES128-GCM-SHA256:ECDHE:ECDH:AES:HIGH:!NULL:!aNULL:!MD5:!ADH:!RC4; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; location / { proxy_pass https://127.0.0.1:1443; } include error.conf; }
mkdir -p /data/jenkins/jenkins_home
docker pull jenkins/jenkins
docker run -d \ --name jenkins \ -v /data/jenkins/jenkins_home:/var/jenkins_home \ -p 18095:8080 \ -p 50000:50000 \ -u 0 \ --restart always \ jenkins/jenkins
docker cp /etc/timezone jenkins:/etc/timezone docker cp /usr/share/zoneinfo/Asia/Shanghai jenkins:/etc/localtime
docker start jenkins
docker logs -f jenkins
“怎么搭建docker-gitlab-jenkins”的內(nèi)容就介紹到這里了,感謝大家的閱讀。如果想了解更多行業(yè)相關(guān)的知識(shí)可以關(guān)注創(chuàng)新互聯(lián)網(wǎng)站,小編將為大家輸出更多高質(zhì)量的實(shí)用文章!
網(wǎng)頁(yè)名稱:怎么搭建docker-gitlab-jenkins
本文網(wǎng)址:http://jinyejixie.com/article4/ghhcie.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供服務(wù)器托管、網(wǎng)站營(yíng)銷、全網(wǎng)營(yíng)銷推廣、搜索引擎優(yōu)化、面包屑導(dǎo)航、企業(yè)網(wǎng)站制作
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)