mirror of
https://github.com/yeasy/docker_practice.git
synced 2026-08-10 08:27:25 +00:00
Update nginx to 1.30 stable, add IPVS deprecation note
This commit is contained in:
@@ -158,15 +158,15 @@ $ docker build --build-arg NODE_VERSION=18 -t myapp .
|
||||
```docker
|
||||
## ✅ 好:版本集中管理
|
||||
|
||||
ENV NGINX_VERSION=1.25 \
|
||||
NODE_VERSION=20 \
|
||||
ENV NGINX_VERSION=1.30 \
|
||||
NODE_VERSION=22 \
|
||||
PYTHON_VERSION=3.12
|
||||
|
||||
RUN apt-get install nginx=${NGINX_VERSION}
|
||||
|
||||
## ❌ 差:版本分散在各处
|
||||
|
||||
RUN apt-get install nginx=1.25
|
||||
RUN apt-get install nginx=1.30
|
||||
```
|
||||
|
||||
#### 2. 不要存储敏感信息
|
||||
|
||||
@@ -125,8 +125,8 @@ $ docker build --build-arg ALPINE_VERSION=3.19 .
|
||||
#### 2. 设置软件版本
|
||||
|
||||
```docker
|
||||
# 使用次版本号 (1.25) 而非完整版本号 (1.25.0),以便自动更新到最新补丁版本
|
||||
ARG NGINX_VERSION=1.25
|
||||
# 使用次版本号 (1.30) 而非完整版本号 (1.30.0),以便自动更新到最新补丁版本
|
||||
ARG NGINX_VERSION=1.30
|
||||
|
||||
RUN curl -fsSL https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz | tar -xz
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user