Update nginx references from 1.25 to 1.30

This commit is contained in:
yeasy
2026-04-28 09:24:03 +00:00
parent a89f7285c7
commit 8ebf284f9e
5 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ Starting ──成功──> Healthy ──失败N次──> Unhealthy
#### Web 服务检查
```docker
# 注:nginx 镜像推荐使用具体的版本标签(如 nginx:1.25-alpine
# 注:nginx 镜像推荐使用具体的版本标签(如 nginx:1.30-alpine
FROM nginx
RUN apt-get update && apt-get install -y curl && rm -rf /var/lib/apt/lists/*
+1 -1
View File
@@ -176,5 +176,5 @@ $ docker build --target builder -t username/imagename:tag .
上面例子中我们使用 `COPY --from=0 /go/src/github.com/go/helloworld/app .` 从上一阶段的镜像中复制文件我们也可以复制任意镜像中的文件
```docker
COPY --from=nginx:1.25-alpine /etc/nginx/nginx.conf /nginx.conf
COPY --from=nginx:1.30-alpine /etc/nginx/nginx.conf /nginx.conf
```
@@ -128,8 +128,8 @@ RUN set -x ; cd ${LARAVEL_PATH} \
### 7.18.5 最后一个阶段构建 NGINX 镜像
```docker
# 注:nginx 镜像推荐使用具体的版本标签(如 nginx:1.25-alpine
FROM nginx:1.25-alpine as nginx
# 注:nginx 镜像推荐使用具体的版本标签(如 nginx:1.30-alpine
FROM nginx:1.30-alpine as nginx
ARG LARAVEL_PATH=/app/laravel
@@ -179,7 +179,7 @@ $ docker run -dit --rm --network=laravel -p 8080:80 my/nginx
完整的 `Dockerfile` 文件如下
```docker
# 注:生产环境推荐使用具体的版本标签,如 node:20-alpine、composer:2.x、php:8.3-fpm-alpine、nginx:1.25-alpine
# 注:生产环境推荐使用具体的版本标签,如 node:20-alpine、composer:2.x、php:8.3-fpm-alpine、nginx:1.30-alpine
FROM node:20-alpine as frontend
COPY package.json /app/
@@ -229,7 +229,7 @@ RUN set -x ; cd ${LARAVEL_PATH} \
&& chmod -R 777 storage \
&& php artisan package:discover
FROM nginx:1.25-alpine as nginx
FROM nginx:1.30-alpine as nginx
ARG LARAVEL_PATH=/app/laravel