Anyexyz commited on
Commit
4777ee7
·
verified ·
1 Parent(s): 84f9527

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +31 -31
Dockerfile CHANGED
@@ -1,38 +1,38 @@
1
- # Use a base image with the necessary tools and libraries
2
- FROM debian:bullseye-slim
3
 
4
- # Install required packages
5
- RUN apt-get update && \
6
- apt-get install -y wget gcc g++ make libpcre3 libpcre3-dev gzip zlib1g-dev
 
 
 
 
 
 
 
 
7
 
8
- # Download and extract Tongsuo
9
- WORKDIR /tmp
10
- RUN wget -c https://mirror.ghproxy.com/https://github.com/Tongsuo-Project/Tongsuo/archive/refs/tags/8.4.0.tar.gz && \
11
- tar -zxvf 8.4.0.tar.gz
12
 
13
- # Download and extract Tengine
14
- RUN wget -c https://tengine.taobao.org/download/tengine-3.1.0.tar.gz && \
15
- tar -zxvf tengine-3.1.0.tar.gz
 
 
 
 
 
 
 
 
 
 
16
 
17
- # Build and install Tengine with Tongsuo module
18
- WORKDIR /tmp/tengine-3.1.0
19
- RUN ./configure --prefix=/usr/local/tengine \
20
- --add-module=modules/ngx_tongsuo_ntls \
21
- --with-openssl=../Tongsuo-8.4.0 \
22
- --with-openssl-opt="enable-ntls" \
23
- --with-http_ssl_module \
24
- --with-stream \
25
- --with-stream_ssl_module \
26
- --with-stream_sni && \
27
- make -j && \
28
- make install
29
 
30
- # Cleanup
31
- WORKDIR /
32
- RUN rm -rf /tmp/*
33
-
34
- # Expose necessary ports
35
  EXPOSE 80 443
 
36
 
37
- # Start Tengine
38
- CMD ["/usr/local/tengine/sbin/nginx", "-g", "daemon off;"]
 
 
1
+ FROM ubuntu:laster
 
2
 
3
+ WORKDIR /usr/local/gm-openresty
4
+ # 安装所需依赖包
5
+ RUN apt-get update && apt-get install -y --no-install-recommends \
6
+ build-essential \
7
+ libpcre3 \
8
+ libpcre3-dev \
9
+ zlib1g-dev \
10
+ libssl-dev \
11
+ wget
12
+ wget https://mirror.ghproxy.com/https://github.com/Tongsuo-Project/Tongsuo/archive/refs/tags/8.4.0.tar.gz && tar -zxvf 8.4.0.tar.gz -C /usr/local && \
13
+ wget https://github.com/openresty/openresty/releases/download/v1.25.3.1/openresty-1.25.3.1.tar.gz && tar xzfm openresty-1.25.3.1.tar.gz && \
14
 
 
 
 
 
15
 
16
+ RUN cd openresty-1.25.3.1/ && \
17
+ ./configure \
18
+ --with-http_gzip_module \
19
+ --with-http_ssl_module \
20
+ --with-http_stub_status_module \
21
+ --with-http_v2_module \
22
+ --with-file-aio \
23
+ --with-openssl="/usr/local/Tongsuo-8.4.0" \
24
+ --with-openssl-opt="enable-ntls" \
25
+ make install && \
26
+ rm -rf /usr/local/gm-openresty/* && \
27
+ ln -sf /dev/stdout /usr/local/openresty/nginx/logs/access.log && \
28
+ ln -sf /dev/stderr /usr/local/openresty/nginx/logs/error.log
29
 
30
+ # Add additional binaries into PATH for convenience
31
+ ENV PATH=$PATH:/usr/local/openresty/luajit/bin:/usr/local/openresty/nginx/sbin:/usr/local/openresty/bin
 
 
 
 
 
 
 
 
 
 
32
 
 
 
 
 
 
33
  EXPOSE 80 443
34
+ CMD ["/usr/bin/openresty", "-g", "daemon off;"]
35
 
36
+ # Use SIGQUIT instead of default SIGTERM to cleanly drain requests
37
+ # See https://github.com/openresty/docker-openresty/blob/master/README.md#tips--pitfalls
38
+ STOPSIGNAL SIGQUIT