doc: update docker.md & linux-command.md & nginx.md (#838)

* doc: update linux-command.md

* 增加代理构建

* 删除上次提交多余 e3628fc62d
This commit is contained in:
jaywcjlove
2024-10-12 09:46:18 +00:00
parent 300ea1b306
commit 57103ca884
7 changed files with 106 additions and 93 deletions

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 10 MiB

After

Width:  |  Height:  |  Size: 10 MiB

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -296,6 +296,7 @@
</span><span class="code-line">$ <span class="token function">docker</span> build - <span class="token operator">&#x3C;</span> context.tar.gz
</span><span class="code-line">$ <span class="token function">docker</span> build <span class="token parameter variable">-t</span> eon/nginx-server <span class="token builtin class-name">.</span>
</span><span class="code-line">$ <span class="token function">docker</span> build <span class="token parameter variable">-f</span> myOtherDockerfile <span class="token builtin class-name">.</span>
</span><span class="code-line">$ <span class="token function">docker</span> build --build-arg <span class="token assign-left variable">https_proxy</span><span class="token operator">=</span><span class="token number">127.0</span>.0.1:8088 <span class="token comment"># 使用http代理构建</span>
</span><span class="code-line">$ <span class="token function">curl</span> example.com/remote/Dockerfile <span class="token operator">|</span> <span class="token function">docker</span> build <span class="token parameter variable">-f</span> - <span class="token builtin class-name">.</span>
</span><span class="code-line">$ <span class="token function">docker</span> save <span class="token parameter variable">-o</span> <span class="token operator">&#x3C;</span>保存路径<span class="token operator">></span>/myimage.tar myimage:latest <span class="token comment"># 导出</span>
</span><span class="code-line">$ <span class="token function">docker</span> load <span class="token parameter variable">-i</span> <span class="token operator">&#x3C;</span>路径<span class="token operator">></span>/myimage.tar <span class="token comment"># 导入</span>

View File

@ -32,7 +32,7 @@
<p>这个快速参考备忘单提供了使用 Linux 常用命令的使用清单</p>
</div></header><div class="menu-tocs"><div class="menu-btn"><svg aria-hidden="true" fill="currentColor" height="1em" width="1em" viewBox="0 0 16 16" version="1.1" data-view-component="true">
<path fill-rule="evenodd" d="M2 4a1 1 0 100-2 1 1 0 000 2zm3.75-1.5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zm0 5a.75.75 0 000 1.5h8.5a.75.75 0 000-1.5h-8.5zM3 8a1 1 0 11-2 0 1 1 0 012 0zm-1 6a1 1 0 100-2 1 1 0 000 2z"></path>
</svg></div><div class="menu-modal"><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#命令速查表">命令速查表</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#系统">系统</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#硬件">硬件</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#用户">用户</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#登陆">登陆</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#文件">文件</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#进程">进程</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#安装包">安装包</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#文件权限">文件权限</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#安装源编译">安装源(编译)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#压缩打包">压缩/打包</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#搜索">搜索</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#网络">网络</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#文件传输">文件传输</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#磁盘使用情况">磁盘使用情况</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#目录遍历">目录遍历</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#文件描述符">文件描述符</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#输出重定向">输出重定向</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#前后台">前后台</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#终端关闭程序也关闭">&#x26;(终端关闭,程序也关闭)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#nohup终端关闭程序继续运行">nohup终端关闭程序继续运行</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#screen创建独立会话">screen创建独立会话</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#快捷键">快捷键</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#命令行编辑">命令行编辑</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#其他">其他</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#另见">另见</a></div></div><div class="h1wrap-body"><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="命令速查表"><a aria-hidden="true" tabindex="-1" href="#命令速查表"><span class="icon icon-link"></span></a>命令速查表</h2><div class="wrap-body">
</svg></div><div class="menu-modal"><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#命令速查表">命令速查表</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#系统">系统</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#硬件">硬件</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#用户">用户</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#登陆">登陆</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#文件">文件</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#进程">进程</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#安装包">安装包</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#文件权限">文件权限</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#安装源编译">安装源(编译)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#压缩打包">压缩/打包</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#搜索">搜索</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#网络">网络</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#文件传输">文件传输</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#磁盘使用情况">磁盘使用情况</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#目录遍历">目录遍历</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#文件描述符">文件描述符</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#输出重定向">输出重定向</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#前后台">前后台</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#终端关闭程序也关闭">&#x26;(终端关闭,程序也关闭)</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#nohup终端关闭程序继续运行">nohup终端关闭程序继续运行</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#screen创建独立会话">screen创建独立会话</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#快捷键">快捷键</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#命令行编辑">命令行编辑</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#其他">其他</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#技巧">技巧</a><a aria-hidden="true" class="leve3 tocs-link" data-num="3" href="#linux技巧">linux技巧</a><a aria-hidden="true" class="leve2 tocs-link" data-num="2" href="#另见">另见</a></div></div><div class="h1wrap-body"><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="命令速查表"><a aria-hidden="true" tabindex="-1" href="#命令速查表"><span class="icon icon-link"></span></a>命令速查表</h2><div class="wrap-body">
</div></div><div class="h2wrap-body"><div class="wrap h3body-not-exist row-span-2"><div class="wrap-header h3wrap"><h3 id="系统"><a aria-hidden="true" tabindex="-1" href="#系统"><span class="icon icon-link"></span></a>系统</h3><div class="wrap-body">
<!--rehype:wrap-class=row-span-2-->
@ -96,7 +96,11 @@
<table class="style-list"><thead><tr><th align="left">:---</th><th align="left">:---</th></tr></thead><tbody><tr><td align="left"><strong><code>uname</code></strong></td><td align="left">显示 linux 系统信息</td></tr><tr><td align="left"><strong><code>uname -r</code></strong></td><td align="left">显示内核版本信息</td></tr><tr><td align="left"><strong><code>cat /etc/os-release</code></strong></td><td align="left">显示 linux 系统详细信息</td></tr><tr><td align="left"><strong><code>uptime</code></strong></td><td align="left">显示系统运行的时间(包括平均负载)</td></tr><tr><td align="left"><strong><code>hostname</code></strong></td><td align="left">显示系统主机名</td></tr><tr><td align="left"><strong><code>hostname -i</code></strong></td><td align="left">显示系统的IP地址</td></tr><tr><td align="left"><strong><code>last reboot</code></strong></td><td align="left">显示系统重新启动历史记录</td></tr><tr><td align="left"><strong><code>date</code></strong></td><td align="left">显示当前系统日期和时间</td></tr><tr><td align="left"><strong><code>timedatectl</code></strong></td><td align="left">查询和更改系统时钟</td></tr><tr><td align="left"><strong><code>cal</code></strong></td><td align="left">显示当前日历的月份和日期</td></tr><tr><td align="left"><strong><code>w</code></strong></td><td align="left">显示系统中当前登录的用户</td></tr><tr><td align="left"><strong><code>whoami</code></strong></td><td align="left">显示您的登录身份</td></tr><tr><td align="left"><strong><code>finger username</code></strong></td><td align="left">显示有关用户的信息</td></tr></tbody></table>
<table class="style-list"><thead><tr><th align="left">:---</th><th align="left">:---</th></tr></thead><tbody><tr><td align="left"><strong><code>uname</code></strong></td><td align="left">显示 linux 系统信息</td></tr><tr><td align="left"><strong><code>uname -r</code></strong></td><td align="left">显示内核版本信息</td></tr><tr><td align="left"><strong><code>cat /etc/os-release</code></strong></td><td align="left">显示 linux 系统详细信息</td></tr><tr><td align="left"><strong><code>uptime</code></strong></td><td align="left">显示系统运行的时间(包括平均负载)</td></tr><tr><td align="left"><strong><code>hostname</code></strong></td><td align="left">显示系统主机名</td></tr><tr><td align="left"><strong><code>hostname -i</code></strong></td><td align="left">显示系统的IP地址</td></tr><tr><td align="left"><strong><code>last reboot</code></strong></td><td align="left">显示系统重新启动历史记录</td></tr><tr><td align="left"><strong><code>date</code></strong></td><td align="left">显示当前系统日期和时间</td></tr><tr><td align="left"><strong><code>timedatectl</code></strong></td><td align="left">查询和更改系统时钟</td></tr><tr><td align="left"><strong><code>cal</code></strong></td><td align="left">显示当前日历的月份和日期</td></tr><tr><td align="left"><strong><code>w</code></strong></td><td align="left">显示系统中当前登录的用户</td></tr><tr><td align="left"><strong><code>whoami</code></strong></td><td align="left">显示您的登录身份</td></tr><tr><td align="left"><strong><code>finger username</code></strong></td><td align="left">显示有关用户的信息</td></tr><tr><td align="left"><strong><code>sed -ri 's/.*swap.*/#&#x26;/' /etc/fstab &#x26;&#x26; swapoff -a</code></strong></td><td align="left">关闭swap</td></tr></tbody></table>
<!--rehype:className=style-list-->
</div></div></div><div class="wrap h3body-not-exist row-span-2"><div class="wrap-header h3wrap"><h3 id="硬件"><a aria-hidden="true" tabindex="-1" href="#硬件"><span class="icon icon-link"></span></a>硬件</h3><div class="wrap-body">
<!--rehype:wrap-class=row-span-2-->
@ -996,6 +1000,48 @@
<table class="left-align shortcuts"><thead><tr><th align="left">:---</th><th align="left">:---</th></tr></thead><tbody><tr><td align="left"><code>Ctrl</code>+<code>L</code></td><td align="left">清屏</td></tr><tr><td align="left"><code>Ctrl</code>+<code>C</code></td><td align="left">中断正在执行的程序</td></tr><tr><td align="left"><code>Ctrl</code>+<code>R</code></td><td align="left">按字符串寻找历史命令</td></tr><tr><td align="left"><code>Ctrl</code>+<code>Z</code></td><td align="left">将当前进程放到后台但程序是Stopped状态</td></tr><tr><td align="left"><code>Shift</code>+<code>Insert</code></td><td align="left">粘贴</td></tr><tr><td align="left"><code>Ctrl</code>+<code>PageUp</code></td><td align="left">屏幕输出向上翻页</td></tr><tr><td align="left"><code>Ctrl</code>+<code>PageDown</code></td><td align="left">屏幕输出向下翻页</td></tr><tr><td align="left"><code>Ctrl</code>+<code>P</code> (Up)</td><td align="left">上一条命令</td></tr><tr><td align="left"><code>Ctrl</code>+<code>N</code> (Down)</td><td align="left">下一条命令</td></tr></tbody></table>
<!--rehype:className=left-align shortcuts-->
</div></div></div></div></div><div class="wrap h2body-exist"><div class="wrap-header h2wrap"><h2 id="技巧"><a aria-hidden="true" tabindex="-1" href="#技巧"><span class="icon icon-link"></span></a>技巧</h2><div class="wrap-body">
</div></div><div class="h2wrap-body"><div class="wrap h3body-not-exist row-span-2 col-span-2"><div class="wrap-header h3wrap"><h3 id="linux技巧"><a aria-hidden="true" tabindex="-1" href="#linux技巧"><span class="icon icon-link"></span></a>linux技巧</h3><div class="wrap-body">
<!--rehype:wrap-class=row-span-2 col-span-2-->
<table class="left-align shortcuts"><thead><tr><th align="left">:---</th><th align="left">:---</th></tr></thead><tbody><tr><td align="left"><strong><code>du -h / | sort -rh | head -20</code></strong></td><td align="left">最大20个文件</td></tr><tr><td align="left"><strong><code>grep -Ev '^\s*($|#|;)' example.conf</code></strong></td><td align="left">查看去掉注释和空行</td></tr><tr><td align="left"><strong><code>echo &#x3C;passwd> | passwd root --stdin</code></strong></td><td align="left">单行改密码</td></tr><tr><td align="left"><strong><code>find /data/app/tmp -mtime +30 -name "*.flv" -exec rm -Rf {} \;</code></strong></td><td align="left">删除30天前文件</td></tr><tr><td align="left"><strong><code>for file in $(ls); do sed -i 's/nmg/sz/g' "$file"; done</code></strong></td><td align="left">当前目录修改字符串</td></tr><tr><td align="left"><strong><code>ssh -NfR remote_port:localhost:local_port user@remote_server</code></strong></td><td align="left">ssh代理</td></tr><tr><td align="left"><strong><code>find . -wholename "*.sh" -exec dos2unix {} \;</code></strong></td><td align="left">修复脚本格式错误</td></tr></tbody></table>
<!--rehype:className=left-align shortcuts-->
</div></div></div></div></div><div class="wrap h2body-not-exist"><div class="wrap-header h2wrap"><h2 id="另见"><a aria-hidden="true" tabindex="-1" href="#另见"><span class="icon icon-link"></span></a>另见</h2><div class="wrap-body">
<ul>
<li><a href="https://jaywcjlove.github.io/linux-command">Linux命令大全搜索工具</a> <em>(jaywcjlove.github.io)</em></li>

File diff suppressed because one or more lines are too long

View File

@ -1053,9 +1053,9 @@
<a href="https://github.com/gaoxiaoduan" title="CoderDuan"><img src="https://avatars.githubusercontent.com/u/69953511?v=4" width="42;" alt="CoderDuan"></a>
<a href="https://github.com/lijc210" title="cizai"><img src="https://avatars.githubusercontent.com/u/10651081?v=4" width="42;" alt="cizai"></a>
<a href="https://github.com/chyok" title="chyok"><img src="https://avatars.githubusercontent.com/u/32629225?v=4" width="42;" alt="chyok"></a>
<a href="https://github.com/buyfakett" title="buyfakett"><img src="https://avatars.githubusercontent.com/u/46560426?v=4" width="42;" alt="buyfakett"></a>
<a href="https://github.com/zlfyuan" title="bgbgPang"><img src="https://avatars.githubusercontent.com/u/19658018?v=4" width="42;" alt="bgbgPang"></a>
<a href="https://github.com/Lmmmmmm-bb" title="_lmmmmmm"><img src="https://avatars.githubusercontent.com/u/54026110?v=4" width="42;" alt="_lmmmmmm"></a>
<a href="https://github.com/mariuszmichalowski" title="Mariusz Michalowski"><img src="https://avatars.githubusercontent.com/u/92091891?v=4" width="42;" alt="Mariusz Michalowski"></a>
<a href="https://github.com/binscor" title="Zheng Nai Bin"><img src="https://avatars.githubusercontent.com/u/37325821?v=4" width="42;" alt="Zheng Nai Bin"></a>
<a href="https://github.com/qwxingzhe" title="行者"><img src="https://avatars.githubusercontent.com/u/7071651?v=4" width="42;" alt="行者"></a>
<a href="https://github.com/HanaChan233" title="花开花落"><img src="https://avatars.githubusercontent.com/u/75212820?v=4" width="42;" alt="花开花落"></a>
@ -1083,6 +1083,7 @@
<a href="https://github.com/lozhu20" title="lozhu"><img src="https://avatars.githubusercontent.com/u/44923922?v=4" width="42;" alt="lozhu"></a>
<a href="https://github.com/liliangrong777" title="liliangrong777"><img src="https://avatars.githubusercontent.com/u/58727146?v=4" width="42;" alt="liliangrong777"></a>
<a href="https://github.com/leauny" title="leauny"><img src="https://avatars.githubusercontent.com/u/42369176?v=4" width="42;" alt="leauny"></a>
<a href="https://github.com/mariuszmichalowski" title="Mariusz Michalowski"><img src="https://avatars.githubusercontent.com/u/92091891?v=4" width="42;" alt="Mariusz Michalowski"></a>
<a href="https://github.com/isecret" title="Mao Wang"><img src="https://avatars.githubusercontent.com/u/15724152?v=4" width="42;" alt="Mao Wang"></a>
<a href="https://github.com/likeadmin-likeshop" title="likeadmin通过管理后台-likeshop全开源商城"><img src="https://avatars.githubusercontent.com/u/77180968?v=4" width="42;" alt="likeadmin通过管理后台-likeshop全开源商城"></a>
<a href="https://github.com/Lihuagreek" title="Lihuagreek"><img src="https://avatars.githubusercontent.com/u/51040740?v=4" width="42;" alt="Lihuagreek"></a>
@ -1511,7 +1512,7 @@
<li><a href="https://marketplace.visualstudio.com/items?itemName=jackiotyu.quick-reference">Quick Reference for VSCode</a><a href="https://github.com/jackiotyu/vscode-quick-reference">jackiotyu</a> 提供</li>
</ul>
</div></div><div class="h2wrap-body"></div></div></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 <a href="https://wangchujiang.com/#/app" target="_blank">Kenny Wang</a>. Updated on 2024/10/11 16:57:13</footer></footer><script src="data.js?v=1.6.0" defer></script><script src="js/fuse.min.js?v=1.6.0" defer></script><script src="js/main.js?v=1.6.0" defer></script><div id="mysearch"><div class="mysearch-box"><div class="mysearch-input"><div><svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 18 18">
</div></div><div class="h2wrap-body"></div></div></div></div><footer class="footer-wrap"><footer class="max-container">© 2022 <a href="https://wangchujiang.com/#/app" target="_blank">Kenny Wang</a>. Updated on 2024/10/12 17:45:35</footer></footer><script src="data.js?v=1.6.0" defer></script><script src="js/fuse.min.js?v=1.6.0" defer></script><script src="js/main.js?v=1.6.0" defer></script><div id="mysearch"><div class="mysearch-box"><div class="mysearch-input"><div><svg xmlns="http://www.w3.org/2000/svg" height="1em" width="1em" viewBox="0 0 18 18">
<path fill="currentColor" d="M17.71,16.29 L14.31,12.9 C15.4069846,11.5024547 16.0022094,9.77665502 16,8 C16,3.581722 12.418278,0 8,0 C3.581722,0 0,3.581722 0,8 C0,12.418278 3.581722,16 8,16 C9.77665502,16.0022094 11.5024547,15.4069846 12.9,14.31 L16.29,17.71 C16.4777666,17.8993127 16.7333625,18.0057983 17,18.0057983 C17.2666375,18.0057983 17.5222334,17.8993127 17.71,17.71 C17.8993127,17.5222334 18.0057983,17.2666375 18.0057983,17 C18.0057983,16.7333625 17.8993127,16.4777666 17.71,16.29 Z M2,8 C2,4.6862915 4.6862915,2 8,2 C11.3137085,2 14,4.6862915 14,8 C14,11.3137085 11.3137085,14 8,14 C4.6862915,14 2,11.3137085 2,8 Z"></path>
</svg><input id="mysearch-input" type="search" placeholder="搜索" autocomplete="off"><div class="mysearch-clear"></div></div><button id="mysearch-close" type="button">搜索</button></div><div class="mysearch-result"><div id="mysearch-menu"></div><div id="mysearch-content"></div></div></div></div></body>
</html>