{"id":9722,"date":"2023-03-03T10:55:01","date_gmt":"2023-03-03T02:55:01","guid":{"rendered":"http:\/\/123.57.164.21\/?p=9722"},"modified":"2023-03-03T17:50:19","modified_gmt":"2023-03-03T09:50:19","slug":"docker%e5%ae%89%e8%a3%85gitlab%e6%9c%8d%e5%8a%a1%e5%99%a8","status":"publish","type":"post","link":"https:\/\/92it.top\/?p=9722","title":{"rendered":"docker\u5b89\u88c5Gitlab\u670d\u52a1\u5668"},"content":{"rendered":"\n<p><strong>docker\u5b89\u88c5Gitlab\u670d\u52a1\u5668<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>1.\u62c9\u53d6git\u955c\u50cf<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"> docker pull gitlab\/gitlab-ce:latest<\/pre>\n\n\n\n<p><strong>2.\u521b\u5efa\u76ee\u5f55<\/strong><\/p>\n\n\n\n<p>\u901a\u5e38\u4f1a\u5c06 GitLab \u7684\u914d\u7f6e (etc) \u3001 \u65e5\u5fd7 (log) \u3001\u6570\u636e (data) \u653e\u5230\u5bb9\u5668\u4e4b\u5916\uff0c \u4fbf\u4e8e\u65e5\u540e\u5347\u7ea7\uff0c \u56e0\u6b64\u8bf7\u5148\u51c6\u5907\u8fd9\u4e09\u4e2a\u76ee\u5f55\uff08\u6211\u8fd9\u91cc\u662f\u5728\u666e\u901a\u7528\u6237\u76ee\u5f55\u4e0b\u521b\u5efa\u7684\uff0c\u4e0d\u662froot\uff09<\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">mkdir -p \/apps\/gitlab\/config\nmkdir -p \/apps\/gitlab\/logs\nmkdir -p \/apps\/gitlab\/data<\/pre>\n\n\n\n<p><strong>3.\u521b\u5efa\u5bb9\u5668<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">docker run --detach \\\n  --hostname gitlab.example.com \\\n  --publish 8443:443 --publish 8880:80 \\\n  --name gitlab \\\n  --volume ~\/apps\/gitlab\/config:\/etc\/gitlab \\\n  --volume ~\/apps\/gitlab\/logs:\/var\/log\/gitlab \\\n  --volume ~\/apps\/gitlab\/data:\/var\/opt\/gitlab \\\n  gitlab\/gitlab-ce:latest\n<\/pre>\n\n\n\n<ul><li>hostname gitlab.example.com: \u8bbe\u7f6e\u4e3b\u673a\u540d\u6216\u57df\u540d<\/li><li>publish 8443:443\uff1a\u5c06http\uff1a443\u6620\u5c04\u5230\u5916\u90e8\u7aef\u53e38443<\/li><li>publish 8880:80\uff1a\u5c06web\uff1a80\u6620\u5c04\u5230\u5916\u90e8\u7aef\u53e38880<\/li><li>name gitlab: \u8fd0\u884c\u5bb9\u5668\u540d<\/li><li>restart always: \u81ea\u52a8\u91cd\u542f<\/li><li>volume ~\/apps\/gitlab\/config:\/etc\/gitlab: \u5c06\u5bb9\u5668\u76ee\u5f55\u6302\u8f7d\u5230\u5bbf\u4e3b\u673a<\/li><li>volume ~\/apps\/gitlab\/logs:\/var\/log\/gitlab: \u5c06\u5bb9\u5668\u76ee\u5f55\u6302\u8f7d\u5230\u5bbf\u4e3b\u673a<\/li><li>volume ~\/apps\/gitlab\/data:\/var\/opt\/gitlab: \u5c06\u5bb9\u5668\u76ee\u5f55\u6302\u8f7d\u5230\u5bbf\u4e3b\u673a<\/li><\/ul>\n\n\n\n<p><strong>4.\u6d4f\u89c8\u5668\u8bbf\u95ee\uff1ahttp:\u5bbf\u4e3b\u673aip:8880\uff0c\u5373\u53ef\u8bbf\u95ee\u6210\u529f\u3002<\/strong><\/p>\n\n\n\n<p><strong>5.\u521a\u5b89\u88c5\u6210\u529f\u7684gitlab\uff0c\u4f1a\u628aroot\u7684\u521d\u59cb\u5bc6\u7801\u9690\u85cf\u5728\u4e00\u4e2a\u6587\u4ef6\u4e2d\uff0c\u53ef\u4ee5\u8fdb\u5165\u5bb9\u5668\u540e\u6267\u884c\u5982\u4e0b\u547d\u4ee4\u67e5\u770b\u3002(\u4e5f\u53ef\u4ee5\u5728\u5bbf\u4e3b\u673a\u6302\u8f7d\u6587\u4ef6\u4e2d\u67e5\u627einitial_root_password\u6587\u4ef6)<\/strong><\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\"> cat \/etc\/gitlab\/initial_root_password<\/pre>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-88-1024x312.png\" alt=\"\" class=\"wp-image-9723\" width=\"630\" height=\"191\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-88-1024x312.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-88-300x91.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-88-768x234.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-88-1536x468.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-88-2048x624.png 2048w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-88-830x253.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-88-230x70.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-88-350x107.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-88-480x146.png 480w\" sizes=\"(max-width: 630px) 100vw, 630px\" \/><\/figure><\/div>\n\n\n\n<p><strong>6.\u4f7f\u7528root\u53ca\u5176\u521d\u59cb\u5bc6\u7801\u767b\u5f55\uff0c\u5e76\u4fee\u6539\u5bc6\u7801\u3002<\/strong><\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-89-1024x834.png\" alt=\"\" class=\"wp-image-9724\" width=\"551\" height=\"449\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-89-1024x834.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-89-300x244.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-89-768x626.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-89-830x676.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-89-230x187.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-89-350x285.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-89-480x391.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-89.png 1340w\" sizes=\"(max-width: 551px) 100vw, 551px\" \/><\/figure><\/div>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-90-1024x344.png\" alt=\"\" class=\"wp-image-9725\" width=\"559\" height=\"188\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-90-1024x344.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-90-300x101.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-90-768x258.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-90-830x279.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-90-230x77.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-90-350x118.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-90-480x161.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-90.png 1358w\" sizes=\"(max-width: 559px) 100vw, 559px\" \/><\/figure><\/div>\n\n\n\n<p>\u81f3\u6b64\uff0c\u4fbf\u53ef\u4ee5\u5c3d\u60c5\u7684\u4f7f\u7528Gitlab\u670d\u52a1\u4e86\u3002<\/p>\n\n\n\n<p><strong>1 \u6838 2G \u670d\u52a1\u5668\u5b89\u88c5 gitlab-ce<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p>\u6700\u65b0\u7248\u672c\u7684gitlab\u5360\u7528\u5185\u5b58\u5f88\u5927\uff0c\u670d\u52a1\u5668\u914d\u7f6e\u4f4e\u8fd0\u884c\u4e0d\u8d77\u6765\u3002<\/p>\n\n\n\n<p>\u5404\u7248\u672c\u8d44\u6e90\u5bf9\u6bd4<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-91-1024x221.png\" alt=\"\" class=\"wp-image-9726\" width=\"620\" height=\"134\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-91-1024x221.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-91-300x65.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-91-768x166.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-91-1536x331.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-91-830x179.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-91-230x50.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-91-350x76.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-91-480x104.png 480w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-91.png 1984w\" sizes=\"(max-width: 620px) 100vw, 620px\" \/><\/figure><\/div>\n\n\n\n<p>\u6240\u4ee5\u6211\u4eec\u53ef\u4ee5\u88c5\u8001\u4e00\u70b9\u7248\u672c\u7684\u3002<\/p>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/123.57.164.21\/wp-content\/uploads\/2023\/03\/image-94-1024x527.png\" alt=\"\" class=\"wp-image-9731\" width=\"636\" height=\"327\" srcset=\"https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-94-1024x527.png 1024w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-94-300x154.png 300w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-94-768x395.png 768w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-94-1536x790.png 1536w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-94-2048x1054.png 2048w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-94-830x427.png 830w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-94-230x118.png 230w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-94-350x180.png 350w, https:\/\/92it.top\/wp-content\/uploads\/2023\/03\/image-94-480x247.png 480w\" sizes=\"(max-width: 636px) 100vw, 636px\" \/><\/figure><\/div>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">docker pull gitlab\/gitlab-ce:9.1.10-ce.0<\/pre>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">docker run --detach \\\n  --publish 8443:443 --publish 8880:80 \\\n  --name gitlab \\\n  --volume \/mnt\/gitlab\/config:\/etc\/gitlab \\\n  --volume \/mnt\/gitlab\/logs:\/var\/log\/gitlab \\\n  --volume \/mnt\/gitlab\/data:\/var\/opt\/gitlab \\\n  gitlab\/gitlab-ce:9.1.10-ce.0<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>docker\u5b89\u88c5Gitlab\u670d\u52a1\u5668 1.\u62c9\u53d6git\u955c\u50cf 2.\u521b\u5efa\u76ee\u5f55 \u901a\u5e38\u4f1a\u5c06 GitLab \u7684\u914d\u7f6e (etc [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20],"tags":[],"_links":{"self":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/9722"}],"collection":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9722"}],"version-history":[{"count":6,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/9722\/revisions"}],"predecessor-version":[{"id":9735,"href":"https:\/\/92it.top\/index.php?rest_route=\/wp\/v2\/posts\/9722\/revisions\/9735"}],"wp:attachment":[{"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9722"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=9722"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/92it.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=9722"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}