Fix outdated versions, template variables and version inconsistencies

- Update K8s Dashboard v2.0.0 to v2.7.0
- Update etcd v3.4.0 to v3.5.17
- Update PostgreSQL 15 to 16 for consistency
- Update Node.js 12 to 20 (current LTS)
- Replace unresolved GitBook template variables (CODE1/2/3/9)
This commit is contained in:
yeasy
2026-03-14 08:45:42 -07:00
parent f430657e5e
commit 6678e313ef
6 changed files with 11 additions and 11 deletions

Binary file not shown.

Binary file not shown.

View File

@@ -126,7 +126,7 @@ VOLUME /data
#### 数据库持久化 #### 数据库持久化
```docker ```docker
FROM postgres:15 FROM postgres:16
VOLUME /var/lib/postgresql/data VOLUME /var/lib/postgresql/data
``` ```
@@ -181,7 +181,7 @@ $ docker inspect mycontainer --format '{{json .Mounts}}' | jq
```yaml ```yaml
services: services:
db: db:
image: postgres:15 image: postgres:16
volumes: volumes:
# 命名卷(推荐) # 命名卷(推荐)
@@ -224,7 +224,7 @@ $ docker run -v mysql_data:/var/lib/mysql mysql:8.0
```docker ```docker
## 数据库必须使用卷 ## 数据库必须使用卷
FROM postgres:15 FROM postgres:16
VOLUME /var/lib/postgresql/data VOLUME /var/lib/postgresql/data
``` ```

View File

@@ -9,7 +9,7 @@
执行以下命令即可部署 Dashboard 执行以下命令即可部署 Dashboard
```bash ```bash
kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.0.0/aio/deploy/recommended.yaml kubectl apply -f https://raw.githubusercontent.com/kubernetes/dashboard/v2.7.0/aio/deploy/recommended.yaml
``` ```
### 14.7.2 访问 ### 14.7.2 访问

View File

@@ -13,12 +13,12 @@
例如使用 `curl` 工具下载压缩包并解压 例如使用 `curl` 工具下载压缩包并解压
```bash ```bash
$ curl -L https://github.com/etcd-io/etcd/releases/download/v3.4.0/etcd-v3.4.0-linux-amd64.tar.gz -o etcd-v3.4.0-linux-amd64.tar.gz $ curl -L https://github.com/etcd-io/etcd/releases/download/v3.5.17/etcd-v3.5.17-linux-amd64.tar.gz -o etcd-v3.5.17-linux-amd64.tar.gz
## 国内用户可选择就近的网络加速方式(以可用镜像站为准) ## 国内用户可选择就近的网络加速方式(以可用镜像站为准)
$ tar xzvf etcd-v3.4.0-linux-amd64.tar.gz $ tar xzvf etcd-v3.5.17-linux-amd64.tar.gz
$ cd etcd-v3.4.0-linux-amd64 $ cd etcd-v3.5.17-linux-amd64
``` ```
解压后可以看到文件包括 解压后可以看到文件包括
@@ -70,8 +70,8 @@ $ docker run \
-p 2379:2379 \ -p 2379:2379 \
-p 2380:2380 \ -p 2380:2380 \
--mount type=bind,source=/tmp/etcd-data.tmp,destination=/etcd-data \ --mount type=bind,source=/tmp/etcd-data.tmp,destination=/etcd-data \
--name etcd-gcr-v3.4.0 \ --name etcd-gcr-v3.5.17 \
quay.io/coreos/etcd:v3.4.0 \ quay.io/coreos/etcd:v3.5.17 \
/usr/local/bin/etcd \ /usr/local/bin/etcd \
--name s1 \ --name s1 \
--data-dir /etcd-data \ --data-dir /etcd-data \

View File

@@ -11,7 +11,7 @@
在项目中创建一个 Dockerfile 在项目中创建一个 Dockerfile
```docker ```docker
FROM node:12 FROM node:20
## replace this with your application's default port ## replace this with your application's default port
EXPOSE 8888 EXPOSE 8888
@@ -33,7 +33,7 @@ $ docker run -it --rm \
--mount type=bind,src="$(pwd)",target=/usr/src/myapp \ --mount type=bind,src="$(pwd)",target=/usr/src/myapp \
-w /usr/src/myapp \ -w /usr/src/myapp \
node:12-alpine \ node:20-alpine \
node your-daemon-or-script.js node your-daemon-or-script.js
``` ```