@@ -49,8 +49,6 @@ RUN GPG_KEYS=D6786CE303D9A9022998DC6CC8464D549AF75C0A \
49
49
--with-file-aio \
50
50
--with-http_v2_module \
51
51
--with-http_v3_module \
52
- --with-cc-opt=-I/usr/src/boringssl/.openssl/include \
53
- --with-ld-opt=-L/usr/src/boringssl/.openssl/lib \
54
52
--add-dynamic-module=/usr/src/ngx_headers_more \
55
53
--add-dynamic-module=/usr/src/ngx_brotli \
56
54
--add-dynamic-module=/usr/src/njs/nginx \
@@ -88,8 +86,8 @@ RUN GPG_KEYS=D6786CE303D9A9022998DC6CC8464D549AF75C0A \
88
86
zlib \
89
87
zlib-dev \
90
88
mercurial \
91
- && curl -fSL https://nginx.org/download/nginx-$NGINX_VERSION.tar.gz -o nginx.tar.gz \
92
- && curl -fSL https://nginx.org/download/nginx-$NGINX_VERSION.tar.gz.asc -o nginx.tar.gz.asc \
89
+ && curl -fSL https://nginx.org/download/nginx-$NGINX_VERSION.tar.gz -o nginx-$NGINX_VERSION .tar.gz \
90
+ && curl -fSL https://nginx.org/download/nginx-$NGINX_VERSION.tar.gz.asc -o nginx-$NGINX_VERSION .tar.gz.asc \
93
91
&& export GNUPGHOME="$(mktemp -d)" \
94
92
&& found='' ; \
95
93
for server in \
@@ -102,35 +100,34 @@ RUN GPG_KEYS=D6786CE303D9A9022998DC6CC8464D549AF75C0A \
102
100
gpg --keyserver "$server" --keyserver-options timeout=10 --recv-keys "$GPG_KEYS" && found=yes && break; \
103
101
done; \
104
102
test -z "$found" && echo >&2 "error: failed to fetch GPG key $GPG_KEYS" && exit 1; \
105
- gpg --batch --verify nginx.tar.gz.asc nginx.tar.gz \
106
- && rm -rf "$GNUPGHOME" nginx.tar.gz.asc \
103
+ gpg --batch --verify nginx-$NGINX_VERSION.tar.gz.asc nginx-$NGINX_VERSION.tar.gz \
107
104
&& mkdir -p /usr/src \
108
- \
105
+ && tar -zxC /usr/src -f nginx-$NGINX_VERSION.tar.gz \
106
+ && rm nginx-$NGINX_VERSION.tar.gz \
107
+ && rm -rf "$GNUPGHOME" nginx-$NGINX_VERSION.tar.gz.asc \
109
108
&& git clone --depth=1 --recurse-submodules https://github.com/google/ngx_brotli /usr/src/ngx_brotli \
110
109
&& git clone --depth=1 https://github.com/openresty/headers-more-nginx-module /usr/src/ngx_headers_more \
111
110
&& hg clone http://hg.nginx.org/njs /usr/src/njs \
112
- && (git clone --depth=1 https://boringssl.googlesource.com/boringssl /usr/src/boringssl \
113
- && mkdir -p /usr/src/boringssl/build /usr/src/boringssl/.openssl/lib /usr/src/boringssl/.openssl/include \
114
- && ln -sf /usr/src/boringssl/include/openssl /usr/src/boringssl/.openssl/include/openssl \
115
- && touch /usr/src/boringssl/.openssl/include/openssl/ssl.h \
116
- && cmake -B/usr/src/boringssl/build -H/usr/src/boringssl -DCMAKE_BUILD_TYPE=RelWithDebInfo \
111
+ && (git clone https://boringssl.googlesource.com/boringssl /usr/src/boringssl \
112
+ && cd /usr/src/boringssl && git checkout --force --quiet e648990 \
113
+ && (grep -qxF 'SET_TARGET_PROPERTIES(crypto PROPERTIES SOVERSION 1)' /usr/src/boringssl/crypto/CMakeLists.txt || echo -e '\n SET_TARGET_PROPERTIES(crypto PROPERTIES SOVERSION 1)' >> /usr/src/boringssl/crypto/CMakeLists.txt) \
114
+ && (grep -qxF 'SET_TARGET_PROPERTIES(ssl PROPERTIES SOVERSION 1)' /usr/src/boringssl/ssl/CMakeLists.txt || echo -e '\n SET_TARGET_PROPERTIES(ssl PROPERTIES SOVERSION 1)' >> /usr/src/boringssl/ssl/CMakeLists.txt) \
115
+ && mkdir -p /usr/src/boringssl/build \
116
+ && cmake -B/usr/src/boringssl/build -S/usr/src/boringssl -DCMAKE_BUILD_TYPE=RelWithDebInfo \
117
117
&& make -C/usr/src/boringssl/build -j$(getconf _NPROCESSORS_ONLN) \
118
- && cp /usr/src/boringssl/build/crypto/libcrypto.a /usr/src/boringssl/build/ssl/libssl.a /usr/src/boringssl/.openssl/lib) \
119
- \
120
- && tar -zxC /usr/src -f nginx.tar.gz \
121
- && rm nginx.tar.gz \
118
+ ) \
122
119
&& cd /usr/src/nginx-$NGINX_VERSION \
123
120
&& curl -fSL https://raw.githubusercontent.com/nginx-modules/ngx_http_tls_dyn_size/master/nginx__dynamic_tls_records_1.25.1%2B.patch -o dynamic_tls_records.patch \
124
121
&& patch -p1 < dynamic_tls_records.patch \
125
- && ./configure $CONFIG --with-debug \
122
+ && ./configure $CONFIG --with-debug --with-cc-opt= "-I/usr/src/boringssl/include" --with-ld-opt= "-L/usr/src/boringssl/build/ssl -L/usr/src/boringssl/build/crypto" \
126
123
&& make -j$(getconf _NPROCESSORS_ONLN) \
127
124
&& mv objs/nginx objs/nginx-debug \
128
125
&& mv objs/ngx_http_xslt_filter_module.so objs/ngx_http_xslt_filter_module-debug.so \
129
126
&& mv objs/ngx_http_image_filter_module.so objs/ngx_http_image_filter_module-debug.so \
130
127
&& mv objs/ngx_http_geoip_module.so objs/ngx_http_geoip_module-debug.so \
131
128
&& mv objs/ngx_http_perl_module.so objs/ngx_http_perl_module-debug.so \
132
129
&& mv objs/ngx_stream_geoip_module.so objs/ngx_stream_geoip_module-debug.so \
133
- && ./configure $CONFIG \
130
+ && ./configure $CONFIG --with-cc-opt= "-I/usr/src/boringssl/include" --with-ld-opt= "-L/usr/src/boringssl/build/ssl -L/usr/src/boringssl/build/crypto" \
134
131
&& make -j$(getconf _NPROCESSORS_ONLN) \
135
132
&& make install \
136
133
&& rm -rf /etc/nginx/html/ \
0 commit comments