-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path8.html
More file actions
273 lines (273 loc) · 24.4 KB
/
Copy path8.html
File metadata and controls
273 lines (273 loc) · 24.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
<!doctype html>
<html lang="zh-CN">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="description" content="CodeClub - Docker 镜像使用" />
<meta name="author" content="Jackson" />
<title>Docker 镜像使用 - CodeClub</title>
<link rel="icon" type="image/x-icon" href="../../img/logo.png" />
<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
<link
href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css"
crossorigin="anonymous"
referrerpolicy="no-referrer"
/>
<link rel="stylesheet" href="../../css/main.css" />
<link rel="stylesheet" href="../../css/dark-mode.css" />
<link rel="stylesheet" href="../../css/mobile-optimizations.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/marked/12.0.0/marked.min.js"></script>
<style>
.tutorial-page {
max-width: 1200px;
margin: 70px auto 40px;
padding: 0 20px;
display: flex;
gap: 20px;
}
.tutorial-sidebar {
width: 240px;
flex-shrink: 0;
position: sticky;
top: 70px;
max-height: calc(100vh - 90px);
overflow-y: auto;
background: var(--bg-secondary, #fff);
border-radius: 8px;
padding: 16px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.tutorial-sidebar h3 {
font-size: 15px;
margin: 0 0 12px;
color: var(--text-primary, #1a1a2e);
padding-bottom: 8px;
border-bottom: 2px solid var(--primary, #3b82f6);
}
.tutorial-sidebar a {
display: block;
padding: 5px 8px;
color: var(--text-secondary, #666);
text-decoration: none;
font-size: 13px;
border-radius: 4px;
line-height: 1.4;
}
.tutorial-sidebar a:hover {
background: var(--primary, #3b82f6);
color: #fff;
}
.tutorial-sidebar a.active {
background: var(--primary, #3b82f6);
color: #fff;
font-weight: 600;
}
.tutorial-main {
flex: 1;
min-width: 0;
}
.tutorial-article {
background: var(--bg-secondary, #fff);
border-radius: 8px;
padding: 32px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.tutorial-article h1 {
font-size: 26px;
margin-bottom: 16px;
color: var(--text-primary, #1a1a2e);
border-bottom: 2px solid var(--primary, #3b82f6);
padding-bottom: 12px;
}
.markdown-body {
font-size: 15px;
line-height: 1.8;
color: var(--text-secondary, #333);
}
.markdown-body h1 {
font-size: 24px;
border-bottom: 1px solid var(--border, #e5e7eb);
padding-bottom: 8px;
}
.markdown-body h2 {
font-size: 20px;
border-bottom: 1px solid var(--border, #e5e7eb);
padding-bottom: 6px;
}
.markdown-body h3 {
font-size: 17px;
}
.markdown-body pre {
background: #1e1e2e;
color: #cdd6f4;
padding: 16px;
border-radius: 8px;
overflow-x: auto;
}
.markdown-body code {
font-family: 'Fira Code', 'Cascadia Code', monospace;
font-size: 14px;
}
.markdown-body p code {
background: #f1f5f9;
padding: 2px 6px;
border-radius: 4px;
color: #e83e8c;
}
.markdown-body blockquote {
border-left: 4px solid var(--primary, #3b82f6);
padding: 12px 20px;
margin: 16px 0;
background: #f8fafc;
border-radius: 0 8px 8px 0;
}
.markdown-body img {
max-width: 100%;
border-radius: 8px;
}
.markdown-body table {
border-collapse: collapse;
width: 100%;
margin: 16px 0;
}
.markdown-body table th,
.markdown-body table td {
border: 1px solid var(--border, #e5e7eb);
padding: 8px 12px;
text-align: left;
}
.markdown-body table th {
background: var(--bg-primary, #f8fafc);
font-weight: 600;
}
.markdown-body table tr:nth-child(2n) {
background: var(--bg-primary, #f8fafc);
}
.markdown-body ul,
.markdown-body ol {
padding-left: 24px;
margin: 12px 0;
}
.markdown-body li {
margin: 4px 0;
}
.markdown-body hr {
border: none;
border-top: 1px solid var(--border, #e5e7eb);
margin: 24px 0;
}
.markdown-body a {
color: var(--primary, #3b82f6);
text-decoration: none;
}
.markdown-body a:hover {
text-decoration: underline;
}
.page-navigation {
display: flex;
justify-content: space-between;
margin-top: 24px;
padding-top: 16px;
border-top: 1px solid var(--border, #e5e7eb);
}
.page-nav-link {
color: var(--primary, #3b82f6);
text-decoration: none;
font-weight: 500;
font-size: 14px;
}
.page-nav-link:hover {
text-decoration: underline;
}
.source-link {
margin-top: 16px;
font-size: 13px;
color: var(--text-secondary, #999);
}
.source-link a {
color: var(--primary, #3b82f6);
}
@media (max-width: 768px) {
.tutorial-page {
flex-direction: column;
}
.tutorial-sidebar {
width: 100%;
position: static;
max-height: 200px;
}
}
</style>
</head>
<body>
<nav class="navbar">
<div class="navbar-container">
<a class="navbar-brand" href="../../index.html">
<img src="../../img/logo.png" alt="CodeClub" width="32" height="32" />
<span>CodeClub</span>
</a>
<button class="mobile-menu-toggle" aria-label="切换导航菜单"><span></span><span></span><span></span></button>
<ul class="navbar-nav">
<li><a class="nav-link" href="../../index.html">首页</a></li>
<li><a class="nav-link" href="../../nav.html">网址导航</a></li>
<li><a class="nav-link" href="../../blog/">博客</a></li>
<li><a class="nav-link" href="../../wiki/index.html" target="_blank">WiKi</a></li>
<li><a class="nav-link active" href="../index.html">教程</a></li>
<li><a class="nav-link" href="../../book.html">图书</a></li>
<li><a class="nav-link" href="../../contact.html">联系我</a></li>
<li><a class="nav-link" href="../../about.html">关于我</a></li>
</ul>
</div>
</nav>
<div class="tutorial-page">
<div class="tutorial-sidebar">
<h3>📖 Docker</h3>
<a href="0.html">Docker 教程</a>
<a href="1.html">Docker Desktop</a>
<a href="2.html">Ubuntu Docker 安装</a>
<a href="3.html">CentOS Docker 安装</a>
<a href="4.html">Windows Docker 安装</a>
<a href="5.html">Docker 镜像加速</a>
<a href="6.html">Docker Hello World</a>
<a href="7.html">Docker 容器使用</a>
<a href="8.html" class="active">Docker 镜像使用</a>
<a href="9.html">Docker 容器连接</a>
<a href="10.html">Docker 安装 Nginx</a>
<a href="11.html">Docker 安装 PHP</a>
<a href="12.html">Docker 安装 MySQL</a>
<a href="13.html">Docker 安装 Tomcat</a>
<a href="14.html">Docker 安装 Python</a>
<a href="15.html">Docker 安装 Redis</a>
<a href="16.html">Docker 安装 MongoDB</a>
<a href="17.html">Docker 安装 Apache</a>
<a href="18.html">Docker 命令大全</a>
<a href="19.html">Docker 资源汇总</a>
</div>
<div class="tutorial-main">
<div class="tutorial-article">
<div class="markdown-body" id="md-content"></div>
<div class="page-navigation">
<a href="7.html" class="page-nav-link">← Docker 容器使用</a>
<a href="9.html" class="page-nav-link">Docker 容器连接 →</a>
</div>
<div class="source-link">原文来源:<a href="https://www.runoob.com" target="_blank">菜鸟教程</a></div>
</div>
</div>
</div>
<footer class="footer">
<div class="footer-content"><p>© 2024 CodeClub. All rights reserved.</p></div>
</footer>
<script src="../../js/dark-mode.js"></script>
<script src="../../js/mobile-menu.js"></script>
<script>
const md = `# Docker 镜像使用\n\n当运行容器时,使用的镜像如果在本地中不存在,docker 就会自动从 docker 镜像仓库中下载,默认是从 Docker Hub 公共镜像源下载。\n\n\n下面我们来学习:\n\n\n\n\n \n- 1、管理和使用本地 Docker 主机镜像\n \n- 2、创建镜像\n\n\n\n---\n\n\n## 列出镜像列表\n\n我们可以使用 **docker images** 来列出本地主机上的镜像。\n\n\n\n\`\`\`\n\nrunoob@runoob:~$ docker images \nREPOSITORY TAG IMAGE ID CREATED SIZE\nubuntu 14.04 90d5884b1ee0 5 days ago 188 MB\nphp 5.6 f40e9e0f10c8 9 days ago 444.8 MB\nnginx latest 6f8d099c3adc 12 days ago 182.7 MB\nmysql 5.6 f2e8d6c772c0 3 weeks ago 324.6 MB\nhttpd latest 02ef73cf1bc0 3 weeks ago 194.4 MB\nubuntu 15.10 4e3b13c8a266 4 weeks ago 136.3 MB\nhello-world latest 690ed74de00f 6 months ago 960 B\ntraining/webapp latest 6fae60ef3446 11 months ago 348.8 MB\n\n\`\`\`\n\n各个选项说明:\n\n\n\n- \n**REPOSITORY:**表示镜像的仓库源\n\n- \n**TAG:**镜像的标签\n\n- \n**IMAGE ID:**镜像ID\n\n- \n**CREATED:**镜像创建时间\n\n- \n**SIZE:**镜像大小\n\n\n同一仓库源可以有多个 TAG,代表这个仓库源的不同个版本,如 ubuntu 仓库源里,有 15.10、14.04 等多个不同的版本,我们使用 REPOSITORY:TAG 来定义不同的镜像。\n\n\n所以,我们如果要使用版本为15.10的ubuntu系统镜像来运行容器时,命令如下:\n\n\n\n\`\`\`\n\nrunoob@runoob:~$ docker run -t -i ubuntu:15.10 /bin/bash \nroot@d77ccb2e5cca:/#\n\n\`\`\`\n\n参数说明:\n\n\n\n- \n**-i**: 交互式操作。\n- \n**-t**: 终端。\n- \n**ubuntu:15.10**: 这是指用 ubuntu 15.10 版本镜像为基础来启动容器。\n- \n**/bin/bash**:放在镜像名后的是命令,这里我们希望有个交互式 Shell,因此用的是 /bin/bash。\n\n\n\n如果要使用版本为 14.04 的 ubuntu 系统镜像来运行容器时,命令如下:\n\n\n\n\`\`\`\n\nrunoob@runoob:~$ docker run -t -i ubuntu:14.04 /bin/bash \nroot@39e968165990:/# \n\n\`\`\`\n\n如果你不指定一个镜像的版本标签,例如你只使用 ubuntu,docker 将默认使用 ubuntu:latest 镜像。\n\n\n\n---\n\n\n## 获取一个新的镜像\n\n当我们在本地主机上使用一个不存在的镜像时 Docker 就会自动下载这个镜像。如果我们想预先下载这个镜像,我们可以使用 docker pull 命令来下载它。\n\n\n\n\`\`\`\n\nCrunoob@runoob:~$ docker pull ubuntu:13.10\n13.10: Pulling from library/ubuntu\n6599cadaf950: Pull complete \n23eda618d451: Pull complete \nf0be3084efe9: Pull complete \n52de432f084b: Pull complete \na3ed95caeb02: Pull complete \nDigest: sha256:15b79a6654811c8d992ebacdfbd5152fcf3d165e374e264076aa435214a947a3\nStatus: Downloaded newer image for ubuntu:13.10\n\n\`\`\`\n\n下载完成后,我们可以直接使用这个镜像来运行容器。\n\n\n\n---\n\n\n## 查找镜像\n\n我们可以从 Docker Hub 网站来搜索镜像,Docker Hub 网址为:\n**[https://hub.docker.com/](https://hub.docker.com/)**\n\n\n我们也可以使用 docker search 命令来搜索镜像。比如我们需要一个 httpd 的镜像来作为我们的 web 服务。我们可以通过 docker search 命令搜索 httpd 来寻找适合我们的镜像。\n\n\n\n\`\`\`\n\nrunoob@runoob:~$ docker search httpd\n\n\`\`\`\n\n点击图片查看大图:\n\n\n[](https://www.runoob.com/wp-content/uploads/2016/05/423F2A2C-287A-4B03-855E-6A78E125B346.jpg)\n\n\n**NAME: **镜像仓库源的名称\n\n\n**DESCRIPTION: **镜像的描述\n\n\n**OFFICIAL: **是否 docker 官方发布\n\n\n**stars: **类似 Github 里面的 star,表示点赞、喜欢的意思。\n\n\n**AUTOMATED: **自动构建。\n\n\n\n---\n\n\n## 拖取镜像\n\n我们决定使用上图中的 httpd 官方版本的镜像,使用命令 docker pull 来下载镜像。\n\n\n\n\`\`\`\n\nrunoob@runoob:~$ docker pull httpd\nUsing default tag: latest\nlatest: Pulling from library/httpd\n8b87079b7a06: Pulling fs layer \na3ed95caeb02: Download complete \n0d62ec9c6a76: Download complete \na329d50397b9: Download complete \nea7c1f032b5c: Waiting \nbe44112b72c7: Waiting\n\n\`\`\`\n\n下载完成后,我们就可以使用这个镜像了。\n\n\n\n\`\`\`\n\nrunoob@runoob:~$ docker run httpd\n\n\`\`\`\n\n\n---\n\n\n## 删除镜像\n\n镜像删除使用 **docker rmi** 命令,比如我们删除 hello-world 镜像:\n\n\n\n\`\`\`\n$ docker rmi hello-world\n\`\`\`\n\n\n\n\n\n---\n\n\n## 创建镜像\n\n当我们从 docker 镜像仓库中下载的镜像不能满足我们的需求时,我们可以通过以下两种方式对镜像进行更改。\n\n\n\n\n \n- 1、从已经创建的容器中更新镜像,并且提交这个镜像\n \n- 2、使用 Dockerfile 指令来创建一个新的镜像\n\n\n\n\n### 更新镜像\n\n更新镜像之前,我们需要使用镜像来创建一个容器。\n\n\n\n\`\`\`\n\nrunoob@runoob:~$ docker run -t -i ubuntu:15.10 /bin/bash\n\n\`\`\`\n\n进入容器后,更新系统:\n\n\n\n\n\`\`\`\napt-get update\napt-get upgrade -y\n\`\`\`\n\n在完成操作之后,输入 exit 命令来退出这个容器。\n\n\n\n\n\`\`\`\nexit\n\`\`\`\n\n此时 ID 为 e218edb10161 的容器,是按我们的需求更改的容器。我们可以通过命令 docker commit 来提交容器副本。\n\n\n\n\`\`\`\n\nrunoob@runoob:~$ docker commit -m="has update" -a="runoob" e218edb10161 runoob/ubuntu:v2\nsha256:70bf1840fd7c0d2d8ef0a42a817eb29f854c1af8f7c59fc03ac7bdee9545aff8\n\n\`\`\`\n\n\n各个参数说明:\n\n- \n**-m:** 提交的描述信息\n\n- \n**-a:** 指定镜像作者\n\n- \n**e218edb10161:**容器 ID\n\n- \n**runoob/ubuntu:v2:** 指定要创建的目标镜像名\n\n\n我们可以使用 **docker images** 命令来查看我们的新镜像 **runoob/ubuntu:v2**:\n\n\`\`\`\n\nrunoob@runoob:~$ docker images\nREPOSITORY TAG IMAGE ID CREATED SIZE\nrunoob/ubuntu v2 70bf1840fd7c 15 seconds ago 158.5 MB\nubuntu 14.04 90d5884b1ee0 5 days ago 188 MB\nphp 5.6 f40e9e0f10c8 9 days ago 444.8 MB\nnginx latest 6f8d099c3adc 12 days ago 182.7 MB\nmysql 5.6 f2e8d6c772c0 3 weeks ago 324.6 MB\nhttpd latest 02ef73cf1bc0 3 weeks ago 194.4 MB\nubuntu 15.10 4e3b13c8a266 4 weeks ago 136.3 MB\nhello-world latest 690ed74de00f 6 months ago 960 B\ntraining/webapp latest 6fae60ef3446 12 months ago 348.8 MB\n\n\`\`\`\n\n使用我们的新镜像 **runoob/ubuntu** 来启动一个容器\n\n\n\n\`\`\`\n\nrunoob@runoob:~$ docker run -t -i runoob/ubuntu:v2 /bin/bash \nroot@1a9fbdeb5da3:/#\n\n\`\`\`\n\n\n\n### 构建镜像\n\n我们使用命令 **docker build** , 从零开始来创建一个新的镜像。为此,我们需要创建一个 Dockerfile 文件,其中包含一组指令来告诉 Docker 如何构建我们的镜像。\n\n\n\n\`\`\`\n\nrunoob@runoob:~$ cat Dockerfile \nFROM centos:6.7\nMAINTAINER Fisher "fisher@sudops.com"\n\nRUN /bin/echo \'root:123456\' |chpasswd\nRUN useradd runoob\nRUN /bin/echo \'runoob:123456\' |chpasswd\nRUN /bin/echo -e "LANG=\\"en_US.UTF-8\\"" >/etc/default/local\nEXPOSE 22\nEXPOSE 80\nCMD /usr/sbin/sshd -D\n\n\`\`\`\n\n每一个指令都会在镜像上创建一个新的层,每一个指令的前缀都必须是大写的。\n\n\n第一条FROM,指定使用哪个镜像源\n\n\nRUN 指令告诉docker 在镜像内执行命令,安装了什么。。。\n\n\n然后,我们使用 Dockerfile 文件,通过 docker build 命令来构建一个镜像。\n\n\n\n\`\`\`\n\nrunoob@runoob:~$ docker build -t runoob/centos:6.7 .\nSending build context to Docker daemon 17.92 kB\nStep 1 : FROM centos:6.7\n ---> d95b5ca17cc3\nStep 2 : MAINTAINER Fisher "fisher@sudops.com"\n ---> Using cache\n ---> 0c92299c6f03\nStep 3 : RUN /bin/echo \'root:123456\' |chpasswd\n ---> Using cache\n ---> 0397ce2fbd0a\nStep 4 : RUN useradd runoob\n......\n\n\`\`\`\n参数说明:\n\n- \n**-t** :指定要创建的目标镜像名\n\n- \n**.** :Dockerfile 文件所在目录,可以指定Dockerfile 的绝对路径\n\n\n使用docker images 查看创建的镜像已经在列表中存在,镜像ID为860c279d2fec\n\n\n\n\`\`\`\n\nrunoob@runoob:~$ docker images \nREPOSITORY TAG IMAGE ID CREATED SIZE\nrunoob/centos 6.7 860c279d2fec About a minute ago 190.6 MB\nrunoob/ubuntu v2 70bf1840fd7c 17 hours ago 158.5 MB\nubuntu 14.04 90d5884b1ee0 6 days ago 188 MB\nphp 5.6 f40e9e0f10c8 10 days ago 444.8 MB\nnginx latest 6f8d099c3adc 12 days ago 182.7 MB\nmysql 5.6 f2e8d6c772c0 3 weeks ago 324.6 MB\nhttpd latest 02ef73cf1bc0 3 weeks ago 194.4 MB\nubuntu 15.10 4e3b13c8a266 5 weeks ago 136.3 MB\nhello-world latest 690ed74de00f 6 months ago 960 B\ncentos 6.7 d95b5ca17cc3 6 months ago 190.6 MB\ntraining/webapp latest 6fae60ef3446 12 months ago 348.8 MB\n\n\`\`\`\n\n我们可以使用新的镜像来创建容器\n\n\n\n\`\`\`\n\nrunoob@runoob:~$ docker run -t -i runoob/centos:6.7 /bin/bash\n[root@41c28d18b5fb /]# id runoob\nuid=500(runoob) gid=500(runoob) groups=500(runoob)\n\n\`\`\`\n\n从上面看到新镜像已经包含我们创建的用户 runoob。\n\n\n\n\n### 设置镜像标签\n\n我们可以使用 docker tag 命令,为镜像添加一个新的标签。\n\n\n\n\`\`\`\n\nrunoob@runoob:~$ docker tag 860c279d2fec runoob/centos:dev\n\n\`\`\`\n\ndocker tag 镜像ID,这里是 860c279d2fec ,用户名称、镜像源名(repository name)和新的标签名(tag)。\n\n\n使用 docker images 命令可以看到,ID为860c279d2fec的镜像多一个标签。\n\n\n\n\`\`\`\n\nrunoob@runoob:~$ docker images\nREPOSITORY TAG IMAGE ID CREATED SIZE\nrunoob/centos 6.7 860c279d2fec 5 hours ago 190.6 MB\nrunoob/centos dev 860c279d2fec 5 hours ago 190.6 MB\nrunoob/ubuntu v2 70bf1840fd7c 22 hours ago 158.5 MB\nubuntu 14.04 90d5884b1ee0 6 days ago 188 MB\nphp 5.6 f40e9e0f10c8 10 days ago 444.8 MB\nnginx latest 6f8d099c3adc 13 days ago 182.7 MB\nmysql 5.6 f2e8d6c772c0 3 weeks ago 324.6 MB\nhttpd latest 02ef73cf1bc0 3 weeks ago 194.4 MB\nubuntu 15.10 4e3b13c8a266 5 weeks ago 136.3 MB\nhello-world latest 690ed74de00f 6 months ago 960 B\ncentos 6.7 d95b5ca17cc3 6 months ago 190.6 MB\ntraining/webapp latest 6fae60ef3446 12 months ago 348.8 MB\n\n\`\`\`\n \n \n \n \n \n\n \n \n [ Docker 容器连接](http://www.runoob.com/docker/docker-container-connection.html)\n \n\n \n \n \n \n \n\n\n\n\n \n \n \n### 点我分享笔记\n\n \n \n \n \n \n \n [取消](https://www.runoob.comjavascript:;)\n\n\n \n \n \n \n \n \n\n\n 分享笔记\n \n \n \n \n \n \n\n 昵称昵称 (必填)\n 邮箱邮箱 (必填)\n 引用地址引用地址\n \n\n \n \n \n \n\n \n \n\n\n\n\n\n\n\n\n\n \n\n \n\n\n\n\n\n\n \n \n \n \n \n \n\n\n \n \n \n \n \n \n \n \n \n\n\n\n\n\n 在线实例\n\n\n ·[HTML 实例](https://www.runoob.com/html/html-examples.html)\n\n\n ·[CSS 实例](https://www.runoob.com/css/css-examples.html)\n\n\n ·[JavaScript 实例](https://www.runoob.com/js/js-examples.html)\n\n\n ·[Ajax 实例](https://www.runoob.com/ajx/ajax-examples.html)\n\n\n ·[jQuery 实例](https://www.runoob.com/jquery/jquery-examples.html)\n\n\n ·[XML 实例](https://www.runoob.com/xml/xml-examples.html)\n\n\n ·[Java 实例](https://www.runoob.com/java/java-examples.html)\n\n\n\n\n\n 字符集&工具\n\n\n · [HTML 字符集设置](https://www.runoob.com/charsets/html-charsets.html)\n\n\n · [HTML ASCII 字符集](https://www.runoob.com/tags/html-ascii.html)\n\n\n · [JS 混淆/加密](https://www.jyshare.com/front-end/6939/)\n\n\n · [PNG/JPEG 图片压缩](https://www.jyshare.com/front-end/6232/)\n\n\n · [HTML 拾色器](https://www.runoob.com/tags/html-colorpicker.html)\n\n\n · [JSON 格式化工具](https://www.jyshare.com/front-end/53)\n\n\n · [随机数生成器](https://www.jyshare.com/front-end/6680/)\n\n\n\n\n 最新更新\n\n\n ·\n [\n OpenCode 自定义... ](http://www.runoob.com/opencode/opencode-custom-tools.html)\n\n\n ·\n [\n OpenCode Skills ](http://www.runoob.com/opencode/opencode-skills.html)\n\n\n ·\n [\n OpenCode MCP 服... ](http://www.runoob.com/opencode/opencode-mcp.html)\n\n\n ·\n [\n OpenCode LSP 服... ](http://www.runoob.com/opencode/opencode-lsp.html)\n\n\n ·\n [\n OpenCode 权限配置 ](http://www.runoob.com/opencode/opencode-permissions.html)\n\n\n ·\n [\n OpenCode 格式化... ](http://www.runoob.com/opencode/opencode-formatter.html)\n\n\n ·\n [\n OpenCode 自定义... ](http://www.runoob.com/opencode/opencode-commands.html)\n\n\n\n\n 站点信息\n\n\n ·\n [意见反馈](https://www.runoob.commailto:admin@runoob.com)\n\n\n ·\n [免责声明](https://www.runoob.com/disclaimer)\n\n\n ·\n [关于我们](https://www.runoob.com/aboutus)\n\n\n ·\n [文章归档](https://www.runoob.com/archives)\n\n\n\n\n\n\n\n **关注微信**\n\n\n\n \n\n\n\n\n\n\n Copyright © 2013-2026 **[菜鸟教程](https://www.runoob.com//www.runoob.com/)** \n **[runoob.com](https://www.runoob.com//www.runoob.com/)** All Rights Reserved. 备案号:[闽ICP备15012807号-1](https://beian.miit.gov.cn/)\n\n\n\n [ ](https://www.runoob.comjavascript:void(0))\n [](https://www.runoob.comjavascript:void(0))\n [](https://www.runoob.comjavascript:void(0))\n\n\n\n#### 微信关注\n\n `;
document.getElementById('md-content').innerHTML = marked.parse(md);
</script>
</body>
</html>