rainwer 6 сар өмнө
parent
commit
1d54132d46
1 өөрчлөгдсөн 2 нэмэгдсэн , 19 устгасан
  1. 2 19
      Dockerfile

+ 2 - 19
Dockerfile

@@ -1,21 +1,4 @@
-# 使用官方Nginx镜像作为基础
-FROM nginx:1.27-alpine AS builder
-
-RUN apk add --no-cache build-base linux-headers pcre-dev zlib-dev && \
-    wget http://nginx.org/download/nginx-1.27.3.tar.gz && \
-    tar -zxvf nginx-1.27.3.tar.gz && \
-    cd nginx-1.27.3 && \
-    ./configure \
-        --prefix=/etc/nginx \
-        --with-http_gzip_module \
-        --with-http_gzip_static_module \
-        --with-http_gunzip_module && \
-    make && make install
-
-FROM nginx:1.27-alpine
-COPY --from=builder /usr/sbin/nginx /usr/sbin/nginx
-# 验证模块
-RUN nginx -V 2>&1 | grep -E 'gzip|gunzip'
+FROM nginx
 
 # 复制 nginx 配置文件
-COPY ./nginx.conf /etc/nginx/nginx.conf
+COPY ./nginx.conf /etc/nginx/nginx.conf