Build ngx_set_misc nginx module in Dockerfile
This commit is contained in:
		
							
								
								
									
										30
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,30 @@ | ||||
| FROM debian:11 AS build | ||||
|  | ||||
| RUN apt-get update && apt-get install -y \ | ||||
|   curl \ | ||||
|   git \ | ||||
|   build-essential \ | ||||
|   libssl-dev \ | ||||
|   zlib1g-dev \ | ||||
|   libpcre3 libpcre3-dev \ | ||||
|   && rm -rf /var/lib/apt/lists/* | ||||
|  | ||||
| RUN mkdir /src /output | ||||
| WORKDIR /src | ||||
| RUN curl -s https://nginx.org/download/nginx-1.18.0.tar.gz | tar -xzC . | ||||
| RUN git clone --no-checkout https://github.com/openresty/set-misc-nginx-module && \ | ||||
|     cd set-misc-nginx-module && \ | ||||
|     git checkout v0.33 && cd - | ||||
| RUN git clone https://github.com/vision5/ngx_devel_kit/ && \ | ||||
|     cd ngx_devel_kit && \ | ||||
|   git checkout v0.3.1 && cd - | ||||
|  | ||||
| WORKDIR /src/nginx-1.18.0 | ||||
| RUN ./configure --with-http_ssl_module \ | ||||
|         --add-dynamic-module=/src/ngx_devel_kit \ | ||||
|         --add-dynamic-module=/src/set-misc-nginx-module && \ | ||||
|     make -j2 && \ | ||||
|     make install | ||||
|  | ||||
| FROM scratch AS artifacts | ||||
| COPY --from=build /usr/local/nginx/modules/ / | ||||
		Reference in New Issue
	
	Block a user