-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path13.html
More file actions
273 lines (273 loc) · 24.2 KB
/
Copy path13.html
File metadata and controls
273 lines (273 loc) · 24.2 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 安装 Tomcat" />
<meta name="author" content="Jackson" />
<title>Docker 安装 Tomcat - 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">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" class="active">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="12.html" class="page-nav-link">← Docker 安装 MySQL</a>
<a href="14.html" class="page-nav-link">Docker 安装 Python →</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 安装 Tomcat\n\n\n### 方法一、docker pull tomcat\n\n查找 [Docker Hub](https://hub.docker.com/_/tomcat?tab=tags) 上的 Tomcat 镜像:\n\n\n[](https://www.runoob.com/wp-content/uploads/2016/06/F5FE5252-6FD3-4DE3-880B-808477E45676.jpg)\n\n\n可以通过 Sort by 查看其他版本的 tomcat,默认是最新版本 **tomcat:latest**。\n\n\n此外,我们还可以在控制台使用 docker search tomcat 命令来查看可用版本:\n\n\n\n\`\`\`\n\nrunoob@runoob:~/tomcat$ docker search tomcat\nNAME DESCRIPTION STARS OFFICIAL AUTOMATED\ntomcat Apache Tomcat is an open source implementa... 744 [OK] \ndordoka/tomcat Ubuntu 14.04, Oracle JDK 8 and Tomcat 8 ba... 19 [OK]\nconsol/tomcat-7.0 Tomcat 7.0.57, 8080, "admin/admin" 16 [OK]\nconsol/tomcat-8.0 Tomcat 8.0.15, 8080, "admin/admin" 14 [OK]\ncloudesire/tomcat Tomcat server, 6/7/8 8 [OK]\ndavidcaste/alpine-tomcat Apache Tomcat 7/8 using Oracle Java 7/8 wi... 6 [OK]\nandreptb/tomcat Debian Jessie based image with Apache Tomc... 4 [OK]\nkieker/tomcat 2 [OK]\nfbrx/tomcat Minimal Tomcat image based on Alpine Linux 2 [OK]\njtech/tomcat Latest Tomcat production distribution on l... 1 [OK]\n\n\`\`\`\n\n这里我们拉取官方的镜像:\n\n\n\n\`\`\`\nrunoob@runoob:~/tomcat$ docker pull tomcat\n\`\`\`\n\n等待下载完成后,我们就可以在本地镜像列表里查到 REPOSITORY 为 tomcat 的镜像。\n\n\n\n\`\`\`\n\nrunoob@runoob:~/tomcat$ docker images|grep tomcat\ntomcat latest 70f819d3d2d9 7 days ago 335.8 MB\n\n\`\`\`\n\n\n### 方法二、通过 Dockerfile 构建\n\n创建Dockerfile\n\n\n首先,创建目录tomcat,用于存放后面的相关东西。\n\n\n\n\n\`\`\`\nrunoob@runoob:~$ mkdir -p ~/tomcat/webapps ~/tomcat/logs ~/tomcat/conf\n\`\`\`\n\nwebapps 目录将映射为 tomcat 容器配置的应用程序目录。\n\n\nlogs 目录将映射为 tomcat 容器的日志目录。\n\n\nconf 目录里的配置文件将映射为 tomcat 容器的配置文件。\n\n\n进入创建的 tomcat 目录,创建 Dockerfile。\n\n\n\n\`\`\`\n\nFROM openjdk:8-jre\n\nENV CATALINA_HOME /usr/local/tomcat\nENV PATH $CATALINA_HOME/bin:$PATH\nRUN mkdir -p "$CATALINA_HOME"\nWORKDIR $CATALINA_HOME\n\n# let "Tomcat Native" live somewhere isolated\nENV TOMCAT_NATIVE_LIBDIR $CATALINA_HOME/native-jni-lib\nENV LD_LIBRARY_PATH ${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}$TOMCAT_NATIVE_LIBDIR\n\n# runtime dependencies for Tomcat Native Libraries\n# Tomcat Native 1.2+ requires a newer version of OpenSSL than debian:jessie has available\n# > checking OpenSSL library version >= 1.0.2...\n# > configure: error: Your version of OpenSSL is not compatible with this version of tcnative\n# see http://tomcat.10.x6.nabble.com/VOTE-Release-Apache-Tomcat-8-0-32-tp5046007p5046024.html (and following discussion)\n# and https://github.com/docker-library/tomcat/pull/31\nENV OPENSSL_VERSION 1.1.0f-3+deb9u2\nRUN set -ex; \\\n currentVersion="$(dpkg-query --show --showformat \'${Version}\\n\' openssl)"; \\\n if dpkg --compare-versions "$currentVersion" \' /etc/apt/sources.list.d/stretch.list; \\\n { \\\n# add a negative "Pin-Priority" so that we never ever get packages from stretch unless we explicitly request them\n echo \'Package: *\'; \\\n echo \'Pin: release n=stretch*\'; \\\n echo \'Pin-Priority: -10\'; \\\n echo; \\\n# ... except OpenSSL, which is the reason we\'re here\n echo \'Package: openssl libssl*\'; \\\n echo "Pin: version $OPENSSL_VERSION"; \\\n echo \'Pin-Priority: 990\'; \\\n } > /etc/apt/preferences.d/stretch-openssl; \\\n fi; \\\n apt-get update; \\\n apt-get install -y --no-install-recommends openssl="$OPENSSL_VERSION"; \\\n rm -rf /var/lib/apt/lists/*; \\\n fi\n\nRUN apt-get update && apt-get install -y --no-install-recommends \\\n libapr1 \\\n && rm -rf /var/lib/apt/lists/*\n\n# see https://www.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/KEYS\n# see also "update.sh" (https://github.com/docker-library/tomcat/blob/master/update.sh)\nENV GPG_KEYS 05AB33110949707C93A279E3D3EFE6B686867BA6 07E48665A34DCAFAE522E5E6266191C37C037D42 47309207D818FFD8DCD3F83F1931D684307A10A5 541FBE7D8F78B25E055DDEE13C370389288584E7 61B832AC2F1C5A90F0F9B00A1C506407564C17A3 713DA88BE50911535FE716F5208B0AB1D63011C7 79F7026C690BAA50B92CD8B66A3AD3F4F22C4FED 9BA44C2621385CB966EBA586F72C284D731FABEE A27677289986DB50844682F8ACB77FC2E86E29AC A9C5DF4D22E99998D9875A5110C01C5A2F6059E7 DCFD35E0BF8CA7344752DE8B6FB21E8933C60243 F3A04C595DB5B6A5F1ECA43E3B7BBB100D811BBE F7DA48BB64BCB84ECBA7EE6935CD23C10D498E23\n\nENV TOMCAT_MAJOR 8\nENV TOMCAT_VERSION 8.5.32\nENV TOMCAT_SHA512 fc010f4643cb9996cad3812594190564d0a30be717f659110211414faf8063c61fad1f18134154084ad3ddfbbbdb352fa6686a28fbb6402d3207d4e0a88fa9ce\n\nENV TOMCAT_TGZ_URLS \\\n# https://issues.apache.org/jira/browse/INFRA-8753?focusedCommentId=14735394#comment-14735394\n https://www.apache.org/dyn/closer.cgi?action=download&filename=tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz \\\n# if the version is outdated, we might have to pull from the dist/archive :/\n https://www-us.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz \\\n https://www.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz \\\n https://archive.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz\n\nENV TOMCAT_ASC_URLS \\\n https://www.apache.org/dyn/closer.cgi?action=download&filename=tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz.asc \\\n# not all the mirrors actually carry the .asc files :\'(\n https://www-us.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz.asc \\\n https://www.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz.asc \\\n https://archive.apache.org/dist/tomcat/tomcat-$TOMCAT_MAJOR/v$TOMCAT_VERSION/bin/apache-tomcat-$TOMCAT_VERSION.tar.gz.asc\n\nRUN set -eux; \\\n \\\n savedAptMark="$(apt-mark showmanual)"; \\\n apt-get update; \\\n \\\n apt-get install -y --no-install-recommends gnupg dirmngr; \\\n \\\n export GNUPGHOME="$(mktemp -d)"; \\\n for key in $GPG_KEYS; do \\\n gpg --keyserver ha.pool.sks-keyservers.net --recv-keys "$key"; \\\n done; \\\n \\\n apt-get install -y --no-install-recommends wget ca-certificates; \\\n \\\n success=; \\\n for url in $TOMCAT_TGZ_URLS; do \\\n if wget -O tomcat.tar.gz "$url"; then \\\n success=1; \\\n break; \\\n fi; \\\n done; \\\n [ -n "$success" ]; \\\n \\\n echo "$TOMCAT_SHA512 *tomcat.tar.gz" | sha512sum -c -; \\\n \\\n success=; \\\n for url in $TOMCAT_ASC_URLS; do \\\n if wget -O tomcat.tar.gz.asc "$url"; then \\\n success=1; \\\n break; \\\n fi; \\\n done; \\\n [ -n "$success" ]; \\\n \\\n gpg --batch --verify tomcat.tar.gz.asc tomcat.tar.gz; \\\n tar -xvf tomcat.tar.gz --strip-components=1; \\\n rm bin/*.bat; \\\n rm tomcat.tar.gz*; \\\n rm -rf "$GNUPGHOME"; \\\n \\\n nativeBuildDir="$(mktemp -d)"; \\\n tar -xvf bin/tomcat-native.tar.gz -C "$nativeBuildDir" --strip-components=1; \\\n apt-get install -y --no-install-recommends \\\n dpkg-dev \\\n gcc \\\n libapr1-dev \\\n libssl-dev \\\n make \\\n "openjdk-${JAVA_VERSION%%[.~bu-]*}-jdk=$JAVA_DEBIAN_VERSION" \\\n ; \\\n ( \\\n export CATALINA_HOME="$PWD"; \\\n cd "$nativeBuildDir/native"; \\\n gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; \\\n ./configure \\\n --build="$gnuArch" \\\n --libdir="$TOMCAT_NATIVE_LIBDIR" \\\n --prefix="$CATALINA_HOME" \\\n --with-apr="$(which apr-1-config)" \\\n --with-java-home="$(docker-java-home)" \\\n --with-ssl=yes; \\\n make -j "$(nproc)"; \\\n make install; \\\n ); \\\n rm -rf "$nativeBuildDir"; \\\n rm bin/tomcat-native.tar.gz; \\\n \\\n# reset apt-mark\'s "manual" list so that "purge --auto-remove" will remove all build dependencies\n apt-mark auto \'.*\' > /dev/null; \\\n [ -z "$savedAptMark" ] || apt-mark manual $savedAptMark; \\\n apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; \\\n rm -rf /var/lib/apt/lists/*; \\\n \\\n# sh removes env vars it doesn\'t support (ones with periods)\n# https://github.com/docker-library/tomcat/issues/77\n find ./bin/ -name \'*.sh\' -exec sed -ri \'s|^#!/bin/sh$|#!/usr/bin/env bash|\' \'{}\' +\n\n# verify Tomcat Native is working properly\nRUN set -e \\\n && nativeLines="$(catalina.sh configtest 2>&1)" \\\n && nativeLines="$(echo "$nativeLines" | grep \'Apache Tomcat Native\')" \\\n && nativeLines="$(echo "$nativeLines" | sort -u)" \\\n && if ! echo "$nativeLines" | grep \'INFO: Loaded APR based Apache Tomcat Native library\' >&2; then \\\n echo >&2 "$nativeLines"; \\\n exit 1; \\\n fi\n\nEXPOSE 8080\nCMD ["catalina.sh", "run"]\n\n\`\`\`\n\n\n通过 Dockerfile 创建一个镜像,替换成你自己的名字:\n\n\n\n\`\`\`\nrunoob@runoob:~/tomcat$ docker build -t tomcat .\n\`\`\`\n\n创建完成后,我们可以在本地的镜像列表里查找到刚刚创建的镜像:\n\n\n\n\`\`\`\n\nrunoob@runoob:~/tomcat$ docker images|grep tomcat\ntomcat latest 70f819d3d2d9 7 days ago 335.8 MB\n\n\`\`\`\n\n\n\n\n---\n\n\n## 使用 tomcat 镜像\n\n\n### 运行容器\n\n\n\`\`\`\n\nrunoob@runoob:~/tomcat$ docker run --name tomcat -p 8080:8080 -v $PWD/test:/usr/local/tomcat/webapps/test -d tomcat \nacb33fcb4beb8d7f1ebace6f50f5fc204b1dbe9d524881267aa715c61cf75320\nrunoob@runoob:~/tomcat$\n\n\`\`\`\n\n命令说明:\n\n\n**-p 8080:8080:**将主机的 8080 端口映射到容器的 8080 端口。\n\n\n**-v $PWD/test:/usr/local/tomcat/webapps/test:**将主机中当前目录下的 test 挂载到容器的 /test。\n\n\n查看容器启动情况\n\n\n\n\`\`\`\n\nrunoob@runoob:~/tomcat$ docker ps \nCONTAINER ID IMAGE COMMAND ... PORTS NAMES\nacb33fcb4beb tomcat "catalina.sh run" ... 0.0.0.0:8080->8080/tcp tomcat\n\n\`\`\`\n\n通过浏览器访问\n\n\n \n \n \n \n \n\n \n \n [ Docker 安装 Python](http://www.runoob.com/docker/docker-install-python.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>