{"id":167,"date":"2022-02-13T14:47:36","date_gmt":"2022-02-13T06:47:36","guid":{"rendered":"http:\/\/nas.hepcloud.top:7000\/?p=167"},"modified":"2022-11-01T23:44:19","modified_gmt":"2022-11-01T15:44:19","slug":"%e7%be%a4%e6%99%96nas%e6%95%99%e7%a8%8b%e5%8d%81%e5%85%ad%e3%80%81%e5%88%a9%e7%94%a8docker%e5%ae%89%e8%a3%85gitlab%e7%ae%a1%e7%90%86%e4%bb%a3%e7%a0%81%e5%b7%a5%e5%85%b7","status":"publish","type":"post","link":"http:\/\/www.huerpu.cc:7000\/?p=167","title":{"rendered":"\u7fa4\u6656NAS docker\u7cfb\u5217\u6559\u7a0b(\u5341\u516d)\u3001\u5229\u7528Docker\u5b89\u88c5GitLab\u7ba1\u7406\u4ee3\u7801\u5de5\u5177"},"content":{"rendered":"<h3>\u7fa4\u6656NAS\u6559\u7a0b(\u5341\u516d)\u3001\u5229\u7528Docker\u5b89\u88c5GitLab\u7ba1\u7406\u4ee3\u7801\u5de5\u5177<\/h3>\n<p>\u4e3a\u4e86\u66f4\u597d\u7684\u6d4f\u89c8\u4f53\u9a8c\uff0c\u6b22\u8fce\u5149\u987e<a href=\"http:\/\/www.huerpu.cc:7000\">\u52e4\u594b\u7684\u51ef\u5c14\u68ee\u540c\u5b66\u4e2a\u4eba\u535a\u5ba2http:\/\/www.huerpu.cc:7000<\/a><\/p>\n<p>\u7fa4\u6656DSM\u4e0a\u5b89\u88c5GitLab\u6709\u4e24\u79cd\u65b9\u5f0f\uff0c\u4e00\u79cd\u662f\u76f4\u63a5\u5728\u7fa4\u6656\u5957\u4ef6\u4e0a\u5b89\u88c5\uff0c\u53e6\u4e00\u79cd\u662fdocker\u4e2d\u81ea\u5b9a\u4e49\u5b89\u88c5\u3002\u4f46\u662f\u76ee\u524dDSM7\u5957\u4ef6\u4e2d\u6ca1\u6709GitLab\uff0c\u6240\u4ee5\u6211\u4eec\u4f7f\u7528docker\u6765\u5b89\u88c5\u4e00\u4e0b\u3002GitLab\u5b98\u65b9\u5185\u5b58\u63a8\u83504G\u4ee5\u4e0a\uff0c\u8fd9\u91cc\u5efa\u8bae8G\u4ee5\u4e0a\uff0c\u56e0\u4e3aGitLab\u5f88\u5bb9\u6613\u5c31\u4f1a\u5360\u75284G\u5de6\u53f3\u7684\u5185\u5b58\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/13\/014.png\" alt=\"001.png\" \/><\/p>\n<h3>\u4e00\u3001\u7fa4\u6656docker\u5957\u4ef6\u4e2d\u5b89\u88c5gitlab-ce\u3002<\/h3>\n<p>\u641c\u7d22gitlab\uff0c\u9009\u62e9\u7b2c\u4e00\u4e2agitlab\/gitlab-ce\u8fd9\u4e2a\u8fdb\u884c\u4e0b\u8f7d\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/13\/001.png\" alt=\"001.png\" \/><\/p>\n<h3>\u4e8c\u3001gitlab\u5bb9\u5668\u542f\u52a8\u9879\u914d\u7f6e<\/h3>\n<p>\u9996\u5148\u5728\u7fa4\u6656docker\u6587\u4ef6\u5939\u4e0b\u521b\u5efa\u4e00\u4e2agitlab\u7684\u6587\u4ef6\u5939\uff0c\u5e76\u5728\u5176\u4e0b\u9762\u65b0\u5efa\u4e09\u4e2a\u6587\u4ef6\u5939data\u3001config\u3001logs\uff0c\u5e76\u8bbe\u7f6e\u6700\u9ad8\u7684\u8bbf\u95ee\u6743\u9650\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/13\/002.png\" alt=\"001.png\" \/><\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/13\/004.png\" alt=\"001.png\" \/><\/p>\n<p>\u542f\u52a8gitlab\u5bb9\u5668<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/13\/003.png\" alt=\"001.png\" \/><\/p>\n<p>\u9009\u62e9\u9ad8\u7ea7\uff0c\u914d\u7f6edata\u3001config\u3001logs\u4e09\u4e2a\u6587\u4ef6\u5939\u5230\u5bb9\u5668\u6587\u4ef6\u7684\u6620\u5c04\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/13\/005.png\" alt=\"001.png\" \/><\/p>\n<p>\u914d\u7f6e\u7aef\u53e3\u53f7\uff0c\u8fd9\u91cc\u5c31\u53ea\u4f7f\u7528\u5bb9\u5668\u5185\u90e8\u768480\uff0c\u6620\u5c04\u5230NAS\u5bbf\u4e3b\u673a2080\u7aef\u53e3\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/13\/006.png\" alt=\"001.png\" \/><\/p>\n<p>\u7136\u540e\u542f\u52a8gitlab\u5bb9\u5668\uff0c\u5982\u679c\u8fd9\u65f6\u5019\u91cc\u9762\u8bbf\u95ee\u53ef\u80fd\u4f1a\u6709502\u7684\u62a5\u9519\uff0c\u5e94\u8be5\u662fgitlab\u8fd8\u6ca1\u6709\u5b8c\u5168\u542f\u52a8\uff0c\u7b495min\u5de6\u53f3\u5c31\u53ef\u4ee5\u8bbf\u95ee\u4e86\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/13\/007.png\" alt=\"012.png\" \/><\/p>\n<p>\u7b49\u53ef\u4ee5\u767b\u5f55\u4e86\uff0c\u8fd9\u65f6\u5019\u8fd8\u65e0\u6cd5\u4f7f\u7528root\u767b\u5f55\uff0c\u4e0b\u9762\u6211\u4eec\u4fee\u6539\u4e00\u4e0broot\u7684\u5bc6\u7801\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/13\/008.png\" alt=\"012.png\" \/><\/p>\n<h3>\u4e09\u3001\u914d\u7f6egitlab\u7684root\u5bc6\u7801\u3002<\/h3>\n<p>\u9996\u5148\u4f7f\u7528ssh\u767b\u5165\u5230DSM\u7fa4\u6656\uff0c\u7136\u540e\u5207\u6362\u5230\u7fa4\u6656NAS\u7684root\u7528\u6237\u3002<\/p>\n<pre><code class=\"language-shell\">#\u4f7f\u7528ssh\u767b\u5165\u5230DSM\u7fa4\u6656\nssh Jason@192.168.31.180\n\n#\u5207\u6362\u5230\u7fa4\u6656NAS\u7684root\u7528\u6237\nsudo su -<\/code><\/pre>\n<p>\u4f7f\u7528docker\u547d\u4ee4\u8fdb\u5165\u5bb9\u5668<\/p>\n<pre><code class=\"language-shell\">docker exec -it gitlab-gitlab-ce \/bin\/bash<\/code><\/pre>\n<p>\u767b\u5f55GitLab\u7684Rails\u63a7\u5236\u53f0<\/p>\n<pre><code class=\"language-shell\">gitlab-rails console<\/code><\/pre>\n<p>\u4fee\u6539root\u5bc6\u7801\uff0c\u7136\u540e\u4fdd\u5b58<\/p>\n<pre><code class=\"language-shell\">user = User.where(id: 1).first\nuser.password = &#039;123456&#039;\nuser.save!<\/code><\/pre>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/13\/012.png\" alt=\"012.png\" \/><\/p>\n<h3>\u56db\u3001\u8bbf\u95eegitlab\u3002<\/h3>\n<p>\u4f7f\u7528\u521a\u521a\u4fee\u6539\u7684root\u5bc6\u7801\u8fdb\u884c\u767b\u5f55\uff0c\u5373\u53ef\u8bbf\u95ee\uff0cenjoy it\u3002<\/p>\n<p><img decoding=\"async\" src=\"\/wp-content\/uploads\/2022\/02\/13\/013.png\" alt=\"012.png\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7fa4\u6656NAS\u6559\u7a0b(\u5341\u516d)\u3001\u5229\u7528Docker\u5b89\u88c5GitLab\u7ba1\u7406\u4ee3\u7801\u5de5\u5177 \u4e3a\u4e86\u66f4\u597d\u7684\u6d4f\u89c8\u4f53\u9a8c\uff0c\u6b22\u8fce\u5149\u987e\u52e4\u594b\u7684\u51ef\u5c14\u68ee [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,10],"tags":[],"class_list":["post-167","post","type-post","status-publish","format-standard","hentry","category-nas","category-nas-docker"],"_links":{"self":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/167","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=167"}],"version-history":[{"count":1,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/167\/revisions"}],"predecessor-version":[{"id":515,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=\/wp\/v2\/posts\/167\/revisions\/515"}],"wp:attachment":[{"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=167"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=167"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.huerpu.cc:7000\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=167"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}