Skip to content

Commit c799307

Browse files
v1.0.0 doc: add jenkins document. e8d279e
1 parent 557a235 commit c799307

17 files changed

Lines changed: 569 additions & 68 deletions

File tree

gitlab/index.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,20 @@ <h3 id="备份保留七天"><a aria-hidden="true" tabindex="-1" href="#备份保
207207
<p>重新加载 <code>gitlab</code> 配置文件</p>
208208
<pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line line-number" line="1"><span class="token function">docker</span> <span class="token builtin class-name">exec</span> 容器名或容器ID gitlab-ctl reconfigure
209209
</span></code><input type="hidden" value="docker exec 容器名或容器ID gitlab-ctl reconfigure
210+
"><div onclick="copied(this)" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
211+
<h2 id="备份恢复"><a aria-hidden="true" tabindex="-1" href="#备份恢复" class="anchor"><span class="icon icon-link"></span></a>备份恢复</h2>
212+
<pre class="language-sh"><code class="language-sh code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 从xxxxx编号备份中恢复</span>
213+
</span><span class="code-line line-number" line="2"><span class="token comment"># 然后恢复数据,1406691018为备份文件的时间戳</span>
214+
</span><span class="code-line line-number" line="3">gitlab-rake gitlab:backup:restore <span class="token assign-left variable">BACKUP</span><span class="token operator">=</span><span class="token number">1406691018</span>
215+
</span><span class="code-line line-number" line="4">
216+
</span><span class="code-line line-number" line="5"><span class="token comment"># 新版本 1721392543_2024_07_19_17.0.1_gitlab_backup.tar</span>
217+
</span><span class="code-line line-number" line="6">gitlab-rake gitlab:backup:restore <span class="token assign-left variable">BACKUP</span><span class="token operator">=</span>1721392543_2024_07_19_17.0.1
218+
</span></code><input type="hidden" value="# 从xxxxx编号备份中恢复
219+
# 然后恢复数据,1406691018为备份文件的时间戳
220+
gitlab-rake gitlab:backup:restore BACKUP=1406691018
221+
222+
# 新版本 1721392543_2024_07_19_17.0.1_gitlab_backup.tar
223+
gitlab-rake gitlab:backup:restore BACKUP=1721392543_2024_07_19_17.0.1
210224
"><div onclick="copied(this)" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
211225
<h2 id="容器管理"><a aria-hidden="true" tabindex="-1" href="#容器管理" class="anchor"><span class="icon icon-link"></span></a>容器管理</h2>
212226
<pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line line-number" line="1"><span class="token function">docker</span> stop gitlab <span class="token comment"># 停止容器</span>
@@ -688,6 +702,7 @@ <h2 id="升级"><a aria-hidden="true" tabindex="-1" href="#升级" class="anchor
688702
<li><a href="#备份保留七天" class="tocs-link">备份保留七天</a></li>
689703
</ol>
690704
</li>
705+
<li><a href="#备份恢复" class="tocs-link">备份恢复</a></li>
691706
<li><a href="#容器管理" class="tocs-link">容器管理</a></li>
692707
<li><a href="#通过-docker-compose-安装" class="tocs-link">通过 Docker Compose 安装</a></li>
693708
<li><a href="#使用-docker-swarm" class="tocs-link">使用 Docker Swarm</a></li>

index.html

Lines changed: 27 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -296,14 +296,24 @@ <h2 id="镜像管理"><a aria-hidden="true" tabindex="-1" href="#镜像管理" c
296296
"><div onclick="copied(this)" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
297297
<h3 id="下载镜像本地安装镜像"><a aria-hidden="true" tabindex="-1" href="#下载镜像本地安装镜像" class="anchor"><span class="icon icon-link"></span></a>下载镜像本地安装镜像</h3>
298298
<p>由于国区已经无法访问,可以将镜像打包,直接安装镜像压缩文件</p>
299-
<pre class="language-sh"><code class="language-sh code-highlight"><span class="code-line line-number" line="1">$ <span class="token function">docker</span> pull gitlab/gitlab-ce:17.0.1-ce.0 <span class="token comment"># 下载镜像</span>
300-
</span><span class="code-line line-number" line="2"><span class="token comment"># 保存 Docker 镜像到本地文件</span>
301-
</span><span class="code-line line-number" line="3">$ <span class="token function">docker</span> save <span class="token parameter variable">-o</span> <span class="token punctuation">[</span>output-file.tar<span class="token punctuation">]</span> <span class="token punctuation">[</span>image-name<span class="token punctuation">]</span>
302-
</span><span class="code-line line-number" line="4">$ <span class="token function">docker</span> save <span class="token parameter variable">-o</span> gitlab-ce-17.0.1.tar gitlab/gitlab-ce
303-
</span></code><input type="hidden" value="$ docker pull gitlab/gitlab-ce:17.0.1-ce.0 # 下载镜像
299+
<pre class="language-sh"><code class="language-sh code-highlight"><span class="code-line line-number" line="1">$ <span class="token function">docker</span> pull gitlab/gitlab-ce:17.2.0-ce.0 <span class="token comment"># 下载镜像</span>
300+
</span><span class="code-line line-number" line="2">$ <span class="token function">docker</span> pull <span class="token parameter variable">--platform</span> linux/amd64 gitlab/gitlab-ce:17.2.0-ce.0
301+
</span><span class="code-line line-number" line="3">$ <span class="token function">docker</span> pull <span class="token parameter variable">--platform</span> linux/amd64 portainer/portainer-ce:2.20.3-alpine
302+
</span><span class="code-line line-number" line="4">$ <span class="token function">docker</span> pull <span class="token parameter variable">--platform</span> linux/amd64 portainer/agent:2.20.3-alpine
303+
</span><span class="code-line line-number" line="5"><span class="token comment"># 保存 Docker 镜像到本地文件</span>
304+
</span><span class="code-line line-number" line="6">$ <span class="token function">docker</span> save <span class="token parameter variable">-o</span> <span class="token punctuation">[</span>output-file.tar<span class="token punctuation">]</span> <span class="token punctuation">[</span>image-name<span class="token punctuation">]</span>
305+
</span><span class="code-line line-number" line="7">$ <span class="token function">docker</span> save <span class="token parameter variable">-o</span> gitlab-ce.0-17.2.0.tar gitlab/gitlab-ce:17.2.0-ce.0
306+
</span><span class="code-line line-number" line="8">$ <span class="token function">docker</span> save <span class="token parameter variable">-o</span> portainer-agent-2.20.3-alpine.tar portainer/agent:2.20.3-alpine
307+
</span><span class="code-line line-number" line="9">$ <span class="token function">docker</span> save <span class="token parameter variable">-o</span> portainer-ce-2.20.3-alpine.tar portainer/portainer-ce:2.20.3-alpine
308+
</span></code><input type="hidden" value="$ docker pull gitlab/gitlab-ce:17.2.0-ce.0 # 下载镜像
309+
$ docker pull --platform linux/amd64 gitlab/gitlab-ce:17.2.0-ce.0
310+
$ docker pull --platform linux/amd64 portainer/portainer-ce:2.20.3-alpine
311+
$ docker pull --platform linux/amd64 portainer/agent:2.20.3-alpine
304312
# 保存 Docker 镜像到本地文件
305313
$ docker save -o [output-file.tar] [image-name]
306-
$ docker save -o gitlab-ce-17.0.1.tar gitlab/gitlab-ce
314+
$ docker save -o gitlab-ce.0-17.2.0.tar gitlab/gitlab-ce:17.2.0-ce.0
315+
$ docker save -o portainer-agent-2.20.3-alpine.tar portainer/agent:2.20.3-alpine
316+
$ docker save -o portainer-ce-2.20.3-alpine.tar portainer/portainer-ce:2.20.3-alpine
307317
"><div onclick="copied(this)" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
308318
<p>将镜像文件发送到服务器</p>
309319
<pre class="language-sh"><code class="language-sh code-highlight"><span class="code-line line-number" line="1">$ <span class="token function">scp</span> <span class="token punctuation">[</span>output-file.tar<span class="token punctuation">]</span> <span class="token punctuation">[</span>user<span class="token punctuation">]</span>@<span class="token punctuation">[</span>server-ip<span class="token punctuation">]</span>:<span class="token punctuation">[</span>path<span class="token punctuation">]</span>
@@ -720,7 +730,7 @@ <h3 id="测试"><a aria-hidden="true" tabindex="-1" href="#测试" class="anchor
720730
## 或者使用下面命令
721731
docker info
722732
"><div onclick="copied(this)" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
723-
<h2 id="使用docker实战"><a aria-hidden="true" tabindex="-1" href="#使用docker实战" class="anchor"><span class="icon icon-link"></span></a>使用Docker实战</h2>
733+
<h2 id="使用-docker-实战"><a aria-hidden="true" tabindex="-1" href="#使用-docker-实战" class="anchor"><span class="icon icon-link"></span></a>使用 Docker 实战</h2>
724734
<blockquote>
725735
<p>⚠文件挂载注意:docker 禁止用主机上不存在的文件挂载到 container 中已经存在的文件</p>
726736
</blockquote>
@@ -833,6 +843,8 @@ <h3 id="penpot"><a aria-hidden="true" tabindex="-1" href="#penpot" class="anchor
833843
<p><a href="penpot.html">在 docker 中部署 Penpot</a></p>
834844
<h3 id="navidrome"><a aria-hidden="true" tabindex="-1" href="#navidrome" class="anchor"><span class="icon icon-link"></span></a><code>Navidrome</code></h3>
835845
<p><a href="navidrome.html">在 docker 中部署 Navidrome</a></p>
846+
<h3 id="jenkins"><a aria-hidden="true" tabindex="-1" href="#jenkins" class="anchor"><span class="icon icon-link"></span></a><code>Jenkins</code></h3>
847+
<p><a href="jenkins/index.html">在 docker 中部署 Jenkins</a></p>
836848
<h3 id="humpback"><a aria-hidden="true" tabindex="-1" href="#humpback" class="anchor"><span class="icon icon-link"></span></a><code>Humpback</code></h3>
837849
<p>首先创建放持久化数据文件夹,<code>mkdir -p /opt/app/humpback-web</code>,里面存放持久化数据文件,会存储站点管理和分组信息,启动后请妥善保存。</p>
838850
<pre class="language-bash"><code class="language-bash code-highlight"><span class="code-line line-number" line="1"><span class="token comment"># 创建放持久化数据文件夹</span>
@@ -870,16 +882,16 @@ <h3 id="seafile"><a aria-hidden="true" tabindex="-1" href="#seafile" class="anch
870882
seafileltd/seafile:latest
871883
"><div onclick="copied(this)" class="copied"><svg class="octicon-copy" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"></path><path fill-rule="evenodd" d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"></path></svg><svg class="octicon-check" aria-hidden="true" viewBox="0 0 16 16" fill="currentColor" height="12" width="12"><path fill-rule="evenodd" d="M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"></path></svg></div></pre>
872884
<pre class="language-shell"><code class="language-shell code-highlight"><span class="code-line line-number" line="1"><span class="token function">docker</span> run <span class="token parameter variable">-d</span> <span class="token parameter variable">--name</span> seafile <span class="token punctuation">\</span>
873-
</span><span class="code-line line-number" line="2"> <span class="token parameter variable">-e</span> <span class="token assign-left variable">SEAFILE_SERVER_HOSTNAME</span><span class="token operator">=</span>pan.showgold.com <span class="token punctuation">\</span>
874-
</span><span class="code-line line-number" line="3"> <span class="token parameter variable">-e</span> <span class="token assign-left variable">SEAFILE_ADMIN_EMAIL</span><span class="token operator">=</span>wcj@nihaosi.com <span class="token punctuation">\</span>
875-
</span><span class="code-line line-number" line="4"> <span class="token parameter variable">-e</span> <span class="token assign-left variable">SEAFILE_ADMIN_PASSWORD</span><span class="token operator">=</span>wcj@nihaosi.com <span class="token punctuation">\</span>
885+
</span><span class="code-line line-number" line="2"> <span class="token parameter variable">-e</span> <span class="token assign-left variable">SEAFILE_SERVER_HOSTNAME</span><span class="token operator">=</span>pan.example.com <span class="token punctuation">\</span>
886+
</span><span class="code-line line-number" line="3"> <span class="token parameter variable">-e</span> <span class="token assign-left variable">SEAFILE_ADMIN_EMAIL</span><span class="token operator">=</span>wcj@example.com <span class="token punctuation">\</span>
887+
</span><span class="code-line line-number" line="4"> <span class="token parameter variable">-e</span> <span class="token assign-left variable">SEAFILE_ADMIN_PASSWORD</span><span class="token operator">=</span>wcj@example.com <span class="token punctuation">\</span>
876888
</span><span class="code-line line-number" line="5"> <span class="token parameter variable">-v</span> <span class="token environment constant">$HOME</span>/_docker/seafile-data:/shared <span class="token punctuation">\</span>
877889
</span><span class="code-line line-number" line="6"> <span class="token parameter variable">-p</span> <span class="token number">80</span>:80 <span class="token punctuation">\</span>
878890
</span><span class="code-line line-number" line="7"> seafileltd/seafile:latest
879891
</span></code><input type="hidden" value="docker run -d --name seafile \
880-
-e SEAFILE_SERVER_HOSTNAME=pan.showgold.com \
881-
-e SEAFILE_ADMIN_EMAIL=wcj@nihaosi.com \
882-
-e SEAFILE_ADMIN_PASSWORD=wcj@nihaosi.com \
892+
-e SEAFILE_SERVER_HOSTNAME=pan.example.com \
893+
-e SEAFILE_ADMIN_EMAIL=wcj@example.com \
894+
-e SEAFILE_ADMIN_PASSWORD=wcj@example.com \
883895
-v $HOME/_docker/seafile-data:/shared \
884896
-p 80:80 \
885897
seafileltd/seafile:latest
@@ -1024,7 +1036,7 @@ <h2 id="license"><a aria-hidden="true" tabindex="-1" href="#license" class="anch
10241036
<li><a href="#测试" class="tocs-link">测试</a></li>
10251037
</ol>
10261038
</li>
1027-
<li><a href="#使用docker实战" class="tocs-link">使用Docker实战</a>
1039+
<li><a href="#使用-docker-实战" class="tocs-link">使用 Docker 实战</a>
10281040
<ol class="tocs-list is-collapsed">
10291041
<li><a href="#nginx" class="tocs-link">Nginx</a></li>
10301042
<li><a href="#mysql" class="tocs-link">MySQL</a></li>
@@ -1041,6 +1053,7 @@ <h2 id="license"><a aria-hidden="true" tabindex="-1" href="#license" class="anch
10411053
<li><a href="#nps" class="tocs-link">NPS</a></li>
10421054
<li><a href="#penpot" class="tocs-link">Penpot</a></li>
10431055
<li><a href="#navidrome" class="tocs-link">Navidrome</a></li>
1056+
<li><a href="#jenkins" class="tocs-link">Jenkins</a></li>
10441057
<li><a href="#humpback" class="tocs-link">Humpback</a></li>
10451058
<li><a href="#seafile" class="tocs-link">Seafile</a></li>
10461059
<li><a href="#更多" class="tocs-link">更多</a></li>

jenkins/imgs/1.png

367 KB
Loading

jenkins/imgs/10.png

335 KB
Loading

jenkins/imgs/2.png

147 KB
Loading

jenkins/imgs/3.png

170 KB
Loading

jenkins/imgs/4.png

127 KB
Loading

jenkins/imgs/5.png

217 KB
Loading

jenkins/imgs/6.png

249 KB
Loading

jenkins/imgs/7.png

200 KB
Loading

0 commit comments

Comments
 (0)