Skip to content

Commit bd1a92b

Browse files
committed
升级nginx版本
1 parent 3aae2b8 commit bd1a92b

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
# debian
22
FROM debian:bullseye-slim
33

4-
#环境变量
4+
ARG NGINX_VERSION=1.26.2
5+
56
ENV TZ "Asia/Shanghai"
67

78
# conf
@@ -32,7 +33,7 @@ RUN set -x \
3233
&& git clone -b V1.1.28 https://github.com/happyfish100/libserverframe.git --depth 1 \
3334
&& git clone -b V6.09 https://github.com/happyfish100/fastdfs.git --depth 1 \
3435
&& git clone -b V1.23 https://github.com/happyfish100/fastdfs-nginx-module.git --depth 1 \
35-
&& wget https://nginx.org/download/nginx-1.26.2.tar.gz
36+
&& wget https://nginx.org/download/nginx-$NGINX_VERSION.tar.gz
3637
# build libfastcommon / libserverframe / fastdfs
3738
RUN set -x \
3839
&& mkdir /home/dfs \
@@ -44,8 +45,8 @@ RUN set -x \
4445
&& cd /usr/local/src/fastdfs \
4546
&& ./make.sh && ./make.sh install \
4647
&& cd /usr/local/src \
47-
&& tar -zxvf nginx-1.22.1.tar.gz \
48-
&& cd /usr/local/src/nginx-1.22.1 \
48+
&& tar -zxvf nginx-$NGINX_VERSION.tar.gz \
49+
&& cd /usr/local/src/nginx-$NGINX_VERSION \
4950
&& ./configure --add-module=/usr/local/src/fastdfs-nginx-module/src \
5051
&& make && make install \
5152
&& chmod +x /home/fastdfs.sh

Dockerfile-alpine

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
#基础镜像
22
FROM alpine:3.20
33

4-
#环境变量
4+
ARG NGINX_VERSION=1.26.2
5+
56
ENV TZ "Asia/Shanghai"
67

78
# conf
@@ -21,7 +22,7 @@ RUN set -x \
2122
&& git clone -b V1.1.28 https://github.com/happyfish100/libserverframe.git --depth 1 \
2223
&& git clone -b V6.09 https://github.com/happyfish100/fastdfs.git --depth 1 \
2324
&& git clone -b V1.23 https://github.com/happyfish100/fastdfs-nginx-module.git --depth 1 \
24-
&& wget https://nginx.org/download/nginx-1.26.2.tar.gz
25+
&& wget https://nginx.org/download/nginx-$NGINX_VERSION.tar.gz
2526
# build libfastcommon / libserverframe / fastdfs
2627
RUN set -x \
2728
&& mkdir /home/dfs \
@@ -33,8 +34,8 @@ RUN set -x \
3334
&& cd /usr/local/src/fastdfs \
3435
&& ./make.sh && ./make.sh install \
3536
&& cd /usr/local/src \
36-
&& tar -zxvf nginx-1.22.1.tar.gz \
37-
&& cd /usr/local/src/nginx-1.22.1 \
37+
&& tar -zxvf nginx-$NGINX_VERSION.tar.gz \
38+
&& cd /usr/local/src/nginx-$NGINX_VERSION \
3839
&& ./configure --add-module=/usr/local/src/fastdfs-nginx-module/src \
3940
&& make && make install \
4041
&& apk del .build-deps \

0 commit comments

Comments
 (0)