id: f75ebe245a504c25aee572d39330b257
parent_id: 
item_type: 1
item_id: 0bed4bd86d164a9c895645bf25967e30
item_updated_time: 1764345622952
title_diff: "[{\"diffs\":[[1,\"Ubuntu24.04 LTS 版本 Linux 系统在线和离线安装 Docker 和 D\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":45}]"
body_diff: "[{\"diffs\":[[1,\"<html>\\\r\\\n<head>\\\r\\\n  <title>Ubuntu24.04 LTS 版本 Linux 系统在线和离线安装 Docker 和 Docker compose</title>\\\r\\\n  <basefont face=\\\"微软雅黑\\\" size=\\\"2\\\" />\\\r\\\n  <meta http-equiv=\\\"Content-Type\\\" content=\\\"text/html;charset=utf-8\\\" />\\\r\\\n  <meta name=\\\"exporter-version\\\" content=\\\"YXBJ Windows/608924 (zh-CN, DDL); Windows/10.0.0 (Win64); EDAMVersion=V2;\\\"/>\\\r\\\n  <meta name=\\\"content-class\\\" content=\\\"yinxiang.peso.superNote\\\"/>\\\r\\\n  <meta name=\\\"application-data:yinxiang.noteLayout\\\" content=\\\"{\\\"lineSpace\\\":\\\"recommend\\\",\\\"paragraphSpace\\\":\\\"recommend\\\"}\\\"/>\\\r\\\n  <style>\\\r\\\n\\tbody, td {\\\r\\\n\\t  font-family: 微软雅黑;\\\r\\\n\\t  font-size: 12pt;\\\r\\\n\\t}\\\r\\\n  </style>\\\r\\\n</head>\\\r\\\n<body>\\\r\\\n<a name=\\\"38616\\\"></a>\\\r\\\n<h1>Ubuntu24.04 LTS 版本 Linux 系统在线和离线安装 Docker 和 Docker compose</h1>\\\r\\\n\\\r\\\n<div><span style=\\\"margin:0px;\\\"><div style=\\\"padding:8px 0px;margin:8px auto;max-width:700px;\\\"> <div><span></span></div>\\\n<p></p>\\\n<div style=\\\"--en-blockquote:true;box-sizing: border-box; padding-left: 19px; padding-top: 6px; padding-bottom: 6px; border-left: 3px solid #b4c0cc; background-position: initial initial; background-repeat: initial initial; margin-top: 6px\\\"><div>原文链接: <a href=\\\"http://mp.weixin.qq.com/s?__biz=MzIyODg0NTM3Mw==&amp;mid=2247485536&amp;idx=1&amp;sn=0bfbd5b242bfdb1d3223cbeb6247fbf6&amp;chksm=e9d04813e2b5a17ed848071505acfc783ed5c47b811ebf2cc02aa72e285d5c121af98fd6d180&amp;mpshare=1&amp;scene=1&amp;srcid=0319lCJq5mFaCy2yVDjsrRV5&amp;sharer_shareinfo=93e3dbec08e5528d79020c10af74a0aa&amp;sharer_shareinfo_first=93e3dbec08e5528d79020c10af74a0aa#rd\\\"><span>http://mp.weixin.qq.com/s?__biz=MzIyODg0NTM3Mw==&amp;mid=2247485...</span></a></div></div>\\\n<p></p>\\\n<div><span></span></div>\\\n<div style=\\\"\\\"><div><div><h1 style=\\\"margin:0\\\"> Ubuntu24.04 LTS 版本 Linux 系统在线和离线安装 Docker 和 Docker compose </h1><div><span style=\\\"position:relative\\\">原创</span><span><span style=\\\"position:relative\\\">我爱吃火锅烧烤</span></span><span><a style=\\\"position:relative\\\"> 猿小猴子 </a></span><span><em></em></span></div><div style=\\\";\\\"><p style=\\\"margin:0;text-align:left\\\"><span><span style=\\\"font-weight: bold;\\\">一、更换软件源并更新系统</span></span></p><p style=\\\"margin:0;text-align:left\\\"><span>    在 Ubuntu 24.04 LTS 中，系统引入了全新的软件源配置格式。现在的源配置文件内容更加结构化且清晰，主要包含了软件类型 (Types)、源地址 (URIs)、版本代号 (Suites) 以及组件 (Components) 等信息。</span></p><div style=\\\"text-align: left;\\\"><img src=\\\":/b483d95f607847e4abf7af751246a9c3\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;\\\"/></div><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span># cat /etc/apt/sources.list.d/ubuntu.sources</span><div><span><br/></span></div><div><span>Types: deb</span></div><div><span>URIs: http://cn.archive.ubuntu.com/ubuntu/</span></div><div><span>Suites: noble noble-updates noble-backports</span></div><div><span>Components: main restricted universe multiverse</span></div><div><span>Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg</span></div><div><span><br/></span></div><div><span>Types: deb</span></div><div><span>URIs: http://security.ubuntu.com/ubuntu/</span></div><div><span>Suites: noble-security</span></div><div><span>Components: main restricted universe multiverse</span></div><div><span>Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg</span></div><div><span><br/></span></div></div></pre></div><p style=\\\"margin:0;text-align:left\\\"><span>    将源切换到清华镜像，加快国内用户的下载速度：</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>sudo sed <span>-</span>i 's<span>/\\\\(cn.archive\\\\|security\\\\).ubuntu.com/</span>mirrors.tuna.tsinghua.edu.cn<span>/g' /</span>etc<span>/apt/</span>sources.list.d<span>/</span>ubuntu.sources <span>&amp;&amp;</span> sudo apt update <span>&amp;&amp;</span> sudo apt upgrade <span>-</span>y</span></div></pre></div><div style=\\\"text-align: left;\\\"><span><img src=\\\":/3a4def1431bb4817a8265fba4f18ba9f\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;\\\"/></span></div><p style=\\\"margin:0;text-align:left\\\"><span>    切换完源后，更新系统：</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span># 更新软件包列表</span><div><span>sudo apt update</span></div><div><span><br/></span></div><div><span># 升级所有已安装的软件包</span></div><div><span>sudo apt upgrade -y</span></div><div><span><br/></span></div><div><span># 处理依赖关系的变化（包括升级和降级）</span></div><div><span>sudo apt dist-upgrade -y</span></div><div><span><br/></span></div><div><span># 清理未使用的依赖项</span></div><div><span>sudo apt autoremove -y</span></div><div><span><br/></span></div><div><span># 清理旧的软件包缓存</span></div><div><span>sudo apt autoclean</span></div><div><span><br/></span></div><div><span># 清理残留配置文件</span></div><div><span>sudo apt purge $(dpkg --list | grep '^rc' | awk '{print $2}')  </span></div><div><span><br/></span></div><div><span># 删除旧内核</span></div><div><span>sudo apt purge $(dpkg --list | grep 'linux-image-' | awk '{print $2}' | grep -v $(uname -r))  </span></div><div><span><br/></span></div><div><span># 检查并修复损坏的依赖关系</span></div><div><span>sudo apt --fix-broken install</span></div><div><span><br/></span></div><div><span># 清理日志文件</span></div><div><span># 删除超过7天的日志</span></div><div><span>sudo journalctl --vacuum-time=7d</span></div><div><span># 或 保留最近的100MB日志</span></div><div><span>sudo journalctl --vacuum-size=100M</span></div></div></pre></div><p style=\\\"margin:0;text-align:left\\\"><span>    由于首次更新会包含内核更新，我们需要执行重启操作，让内核和各种补丁生效。</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span><span>sudo</span> reboot</span></div></pre></div><p style=\\\"margin:0;text-align:left\\\"><span><span style=\\\"font-weight: bold;\\\">二、安装基础的系统软件工具</span></span></p><p style=\\\"margin:0;text-align:left\\\"><span>    在配置 Linux 开发环境时，有一些基础且实用的系统工具是必不可少的。</span></p><p style=\\\"margin:0;text-align:left\\\"><span>    首先更新软件包索引并安装 openssh-server ，因为我虚拟机安装的是个人桌面版 Ubuntu，默认是不开启SSH连接的：</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span><span>sudo</span> apt update &amp;&amp; sudo apt install -y openssh-server</span></div></pre></div><div style=\\\"text-align: left;\\\"><img src=\\\":/7195f885b565444082a45945e13c44a4\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;\\\"/></div><p style=\\\"margin:0;text-align:left\\\"><span>    然后，按照常用工具，不局限我所列，根据个人需求合理调整：build-essential（编译工具）、git（版本控制）、curl 和 wget（文件下载）、net-tools（网络工具）、htop 和 glances（用于系统资源监控）、iftop 和 iotop （分别用于网络和磁盘 IO 监控）、zip unzip tar gzip（常用解压压缩工具）、ca-certificates （提供 SSL/TLS 证书，用于验证 HTTPS 连接的安全性）、gnupg （管理 GPG 密钥，用于加密、签名及验证软件来源的真实性）:</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>sudo apt install <span>-y</span> <span>build-essential</span> git <span>curl</span> <span>wget</span> net<span>-tools</span> htop glances iftop iotop zip unzip tar gzip ca<span>-certificates</span> gnupg</span></div></pre></div><div style=\\\"text-align: left;\\\"><img src=\\\":/dd0b64b7f86b4f83b52c67618be1d909\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;\\\"/></div><p style=\\\"margin:0;text-align:left\\\"><span><span style=\\\"font-weight: bold;\\\">三、在线命令安装 Docker 和 Docker Compose</span></span></p><p style=\\\"margin:0;text-align:left\\\"><span>    使用清华大学开源软件镜像站的软件仓库  mirrors.tuna.tsinghua.edu.cn，作为安装源：</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>install -m 0755 -d /etc/apt/keyrings</span><div><span>curl -fsSL https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg</span></div><div><span>sudo <span>chmod</span> a+r /etc/apt/keyrings/docker.gpg</span></div><div><span><span>echo</span> <span>&quot;deb [arch=</span><span><span>$(dpkg --print-architecture)</span></span><span> signed-by=/etc/apt/keyrings/docker.gpg] https://mirrors.tuna.tsinghua.edu.cn/docker-ce/linux/ubuntu \\\\</span></span></div><div><span><span>$(. /etc/os-release &amp;&amp; echo </span><span><span>&quot;</span></span><span><span><span>$VERSION_CODENAME</span></span></span><span><span>&quot;</span></span><span>)</span> stable&quot; | sudo <span>tee</span> /etc/apt/sources.list.d/docker.list &gt; /dev/null</span></div></div></pre></div><p style=\\\"margin:0;text-align:left\\\"><span>    安装最新版的 Docker 和 相关插件（比如：docker-compose-plugin 等）; </span><span>docker-buildx-plugin 是 Docker 官方提供的一个 扩展构建工具，它增强了 Docker 原生的镜像构建功能，主要专注于 多平台镜像构建(一次性为多种 CPU 架构（如 AMD64、ARM64）构建镜像，无需手动切换环境,比如: docker buildx build --platform linux/amd64,linux/arm64 -t your-image:tag  ) 和 高效缓存管理。docker buildx build 是 docker build 功能扩展版，推荐替代原生构建功能扩展版，推荐替代原生构建 ：</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>sudo apt<span>-</span><span>get</span> <span>update</span> </span><div><span>sudo apt<span>-</span><span>get</span> install docker<span>-</span>ce docker<span>-</span>ce<span>-</span>cli containerd.io docker<span>-</span>buildx<span>-</span>plugin docker<span>-</span>compose<span>-</span>plugin</span></div></div></pre></div><p style=\\\"margin:0\\\"><span>    创建配置文件 /etc/docker/daemon.json ，自定义配置文件：</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>sudo tee <span>/etc/</span>docker<span>/</span>daemon.json <span>&lt;&lt;</span><span>EOF</span></span><div><span>{</span></div><div><span>  <span>&quot;builder&quot;</span>: {</span></div><div><span>    <span>&quot;gc&quot;</span>: {</span></div><div><span>      <span>&quot;defaultKeepStorage&quot;</span>: <span>&quot;100GB&quot;</span>,</span></div><div><span>      <span>&quot;enabled&quot;</span>: <span>true</span></span></div><div><span>    }</span></div><div><span>  },</span></div><div><span>  <span>&quot;data-root&quot;</span>: <span>&quot;/home/redhat/MyDocker&quot;</span>,</span></div><div><span>  <span>&quot;experimental&quot;</span>: <span>false</span>,</span></div><div><span>  <span>&quot;registry-mirrors&quot;</span>: [</span></div><div><span>    <span>&quot;https://dockerproxy.net&quot;</span>,</span></div><div><span>    <span>&quot;https://docker.hpcloud.cloud&quot;</span>,</span></div><div><span>    <span>&quot;https://docker.m.daocloud.io&quot;</span>,</span></div><div><span>    <span>&quot;https://docker.unsee.tech&quot;</span>,</span></div><div><span>    <span>&quot;https://docker.1panel.live&quot;</span>,</span></div><div><span>    <span>&quot;http://mirrors.ustc.edu.cn&quot;</span>,</span></div><div><span>    <span>&quot;https://docker.chenby.cn&quot;</span>,</span></div><div><span>    <span>&quot;http://mirror.azure.cn&quot;</span>,</span></div><div><span>    <span>&quot;https://dockerpull.org&quot;</span>,</span></div><div><span>    <span>&quot;https://dockerhub.icu&quot;</span>,</span></div><div><span>    <span>&quot;https://hub.rat.dev&quot;</span></span></div><div><span>  ]</span></div><div><span>}</span></div><div><span><span>EOF</span></span></div></div></pre></div><p style=\\\"margin:0\\\"><span>    重新加载配置并重启 Docker 服务，并设置开机自启：</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>sudo systemctl daemon-reload</span><div><span>sudo systemctl restart docker</span></div><div><span>sudo systemctl <span>enable</span> docker --now</span></div><div><span><br/></span></div></div></pre></div><p style=\\\"margin:0;text-align:left\\\"><span>    验证 Docker：</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span><span># 查看 Docker 信息</span></span><div><span><span>docker</span> <span>info</span></span></div><div><span><span># 查看 Docker 版本</span></span></div><div><span>docker --version</span></div><div><span><span># 查看 Docker Compose 版本</span></span></div><div><span>docker compose version</span></div></div></pre></div><div style=\\\"text-align: center;\\\"><img src=\\\":/0de75b8870304074bb540dd873ecb8bd\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;\\\"/></div><p style=\\\"margin:0\\\"><span><span style=\\\"font-weight: bold;\\\">四、Ubuntu中24.04 LTS 离线安装 Docker 和 Docker Compose</span></span></p><p style=\\\"margin:0\\\"><span>    通过 .deb 包离线安装 Docker CE、Docker CE CLI 和 Docker Compose , 适用于无法访问互联网的环境。首先，进入官网下载页面，寻找离线  .deb 包，如下图所示：</span></p><div style=\\\"text-align: center;\\\"><img src=\\\":/95f4e6d553bf4a96b6c16fc7afce6602\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;\\\"/></div><p style=\\\"margin:0\\\"><span>1.下载对应 离线  .deb 包</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span><span>wget</span> https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-ce_28.<span>0</span>.<span>1</span>-<span>1</span>~ubuntu.<span>22</span>.<span>04</span>~jammy_amd64.deb</span><div><span><br/></span></div><div><span><span>wget</span> https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-ce-cli_28.<span>0</span>.<span>1</span>-<span>1</span>~ubuntu.<span>22</span>.<span>04</span>~jammy_amd64.deb</span></div><div><span><br/></span></div><div><span><span>wget</span> https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/containerd.io_1.<span>7</span>.<span>25</span>-<span>1</span>_amd64.deb</span></div><div><span><br/></span></div><div><span><span>wget</span> https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-buildx-plugin_0.<span>21</span>.<span>1</span>-<span>1</span>~ubuntu.<span>22</span>.<span>04</span>~jammy_amd64.deb</span></div><div><span><br/></span></div><div><span><span>wget</span> https://download.docker.com/linux/ubuntu/dists/jammy/pool/stable/amd64/docker-compose-plugin_2.<span>6</span>.<span>0</span>~ubuntu-jammy_amd64.deb</span></div></div></pre></div><p style=\\\"margin:0\\\"><span>2.安装 .deb 包在目标服务器上，进入存放 .deb 文件的目录，依次安装 Docker CE、Docker CE CLI 和 containerd.io</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span><span>sudo</span> dpkg -i docker-ce_28.<span>0</span>.<span>1</span>-<span>1</span>~ubuntu.<span>22</span>.<span>04</span>~jammy_amd64.deb</span><div><span><br/></span></div><div><span><span>sudo</span> dpkg -i docker-ce-cli_28.<span>0</span>.<span>1</span>-<span>1</span>~ubuntu.<span>22</span>.<span>04</span>~jammy_amd64.deb</span></div><div><span><br/></span></div><div><span><span>sudo</span> dpkg -i containerd.io_1.<span>7</span>.<span>25</span>-<span>1</span>_amd64.deb</span></div></div></pre></div><p style=\\\"margin:0\\\"><span>3.配置 Docker 服务，并配置/etc/docker/daemon.json文件（内容和在线安装配置文件内容类似）</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span>sudo systemctl daemon-reload</span><div><span><br/></span></div><div><span>sudo systemctl restart docker</span></div><div><span><br/></span></div><div><span>sudo systemctl <span>enable</span> docker --now</span></div></div></pre></div><p style=\\\"margin:0\\\"><span>4.安装插件</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span><span>sudo</span> dpkg -i docker-buildx-plugin_0.<span>21</span>.<span>1</span>-<span>1</span>~ubuntu.<span>22</span>.<span>04</span>~jammy_amd64.deb</span><div><span><br/></span></div><div><span><span>sudo</span> dpkg -i docker-compose-plugin_2.<span>6</span>.<span>0</span>~ubuntu-jammy_amd64.deb</span></div></div></pre></div><p style=\\\"margin:0\\\"><span>5.验证</span></p><div><pre><div style=\\\"--en-codeblock:true;--en-meta:{&quot;title&quot;:&quot;&quot;,&quot;lang&quot;:&quot;Plain Text&quot;,&quot;theme&quot;:&quot;default&quot;,&quot;showLine&quot;:true,&quot;lineWrap&quot;:true};box-sizing: border-box; padding: 8px; font-family: Monaco, Menlo, Consolas, &quot;Courier New&quot;, monospace; font-size: 12px; color: rgb(51, 51, 51); border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; background-color: rgb(251, 250, 248); border: 1px solid rgba(0, 0, 0, 0.14902); background-position: initial initial; background-repeat: initial initial; margin-top: 6px;\\\"><span><span># 查看 Docker 信息</span></span><div><span><span>docker</span> <span>info</span></span></div><div><span><span># 查看 Docker 版本</span></span></div><div><span>docker --version</span></div><div><span><span># 查看 Docker Compose 版本</span></span></div><div><span>docker compose version</span></div></div></pre></div><p style=\\\"-webkit-tap-highlight-color:transparent;margin:0 0 16px;padding:0;outline:0;max-width:100%;box-sizing:border-box !important;overflow-wrap:break-word !important;clear:both;min-height:1em;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;orphans:2;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;font-size:16px;color:rgb(77,77,77);overflow:auto hidden;font-synthesis-style:auto;font-family:-apple-system,&quot;SF UI Text&quot;,Arial,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei&quot;,&quot;WenQuanYi Micro Hei&quot;,sans-serif,SimHei,SimSun;letter-spacing:normal;text-align:start;background-color:rgb(255,255,255);line-height:24px !important\\\"><span style=\\\"-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;\\\">--------------------------------------</span></p><p style=\\\"-webkit-tap-highlight-color:transparent;margin:0 0 16px;padding:0;outline:0;max-width:100%;box-sizing:border-box !important;overflow-wrap:break-word !important;clear:both;min-height:1em;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;orphans:2;text-indent:0;text-transform:none;widows:2;word-spacing:0;-webkit-text-stroke-width:0;white-space:normal;text-decoration-thickness:initial;text-decoration-style:initial;text-decoration-color:initial;font-size:16px;color:rgb(77,77,77);overflow:auto hidden;font-synthesis-style:auto;font-family:-apple-system,&quot;SF UI Text&quot;,Arial,&quot;PingFang SC&quot;,&quot;Hiragino Sans GB&quot;,&quot;Microsoft YaHei&quot;,&quot;WenQuanYi Micro Hei&quot;,sans-serif,SimHei,SimSun;letter-spacing:normal;text-align:start;background-color:rgb(255,255,255);line-height:24px !important\\\"><span style=\\\"-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;\\\">没有自由的秩序和没有秩序的自由，同样具有破坏性。</span></p><div style=\\\"-webkit-tap-highlight-color: transparent;margin: 0px 0px 16px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;color: rgba(0, 0, 0, 0.9);font-family: &quot;PingFang SC&quot;, system-ui, -apple-system, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: 0.544px;orphans: 2;text-align: justify;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;clear: both;min-height: 1em;background-color: rgb(255, 255, 255);\\\"><img src=\\\":/cf27e80a66414b44ba0d07f87a24e4a4\\\" type=\\\"image/png\\\" data-filename=\\\"640.png\\\" alt=\\\"图片\\\" height=\\\"581\\\" style=\\\"--en-marks:%7B%22align%22%3A%22center%22%7D;-webkit-tap-highlight-color: transparent;margin: 0px;padding:0;outline: none;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;vertical-align: bottom;height: auto !important;border-width: 0px;border-style: initial;border-color: initial;__visibility: visible !important;width: 677px !important;\\\" width=\\\"1081\\\"/></div><div style=\\\"-webkit-tap-highlight-color: transparent;margin: 0px 0px 24px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;color: rgba(0, 0, 0, 0.9);font-family: &quot;PingFang SC&quot;, system-ui, -apple-system, BlinkMacSystemFont, &quot;Helvetica Neue&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei UI&quot;, &quot;Microsoft YaHei&quot;, Arial, sans-serif;font-size: 17px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: 0.544px;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;text-align: left;\\\"><span style=\\\"-webkit-tap-highlight-color: transparent;margin: 0px;padding: 0px;outline: 0px;max-width: 100%;box-sizing: border-box !important;overflow-wrap: break-word !important;\\\"><br/></span></div><p style=\\\"margin:0\\\"><span><br/></span></p><p style=\\\"margin:0;text-align:left\\\"><span><br/></span></p><p style=\\\"margin:0\\\"><span><br/></span></p><p style=\\\"margin:0\\\"><span><br/></span></p><p style=\\\"margin:0\\\"><span><br/></span></p><div><span><br/></span></div></div></div></div></div></div></span>\\\n</div></body></html>\\u0000\"]],\"start1\":0,\"start2\":0,\"length1\":0,\"length2\":29915}]"
metadata_diff: {"new":{"id":"0bed4bd86d164a9c895645bf25967e30","parent_id":"f67288c3a0be4374b5d532b5dcc3aabc","latitude":"0.00000000","longitude":"0.00000000","altitude":"0.0000","author":"","source_url":"","is_todo":0,"todo_due":0,"todo_completed":0,"source":"joplin-desktop","source_application":"net.cozic.joplin-desktop","application_data":"","order":1764348825317,"markup_language":2,"is_shared":0,"share_id":"","conflict_original_id":"","master_key_id":"","user_data":"","deleted_time":0},"deleted":[]}
encryption_cipher_text: 
encryption_applied: 0
updated_time: 2025-11-28T21:04:01.741Z
created_time: 2025-11-28T21:04:01.741Z
type_: 13