-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
support any version in Index.cshtml when replacing frontend version (#83
- Loading branch information
1 parent
9808173
commit 6609aee
Showing
4 changed files
with
78 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# Based on: https://github.com/tofran/nginx-with-substitutions-filter-docker/blob/main/Dockerfile | ||
|
||
ARG NGINX_VERSION | ||
|
||
FROM nginx:${NGINX_VERSION}-alpine-perl AS builder | ||
|
||
RUN apk add --no-cache --virtual .build-deps \ | ||
alpine-sdk \ | ||
bash \ | ||
findutils \ | ||
gcc \ | ||
gd-dev \ | ||
geoip-dev \ | ||
libc-dev \ | ||
libedit-dev \ | ||
libxslt-dev \ | ||
linux-headers \ | ||
make \ | ||
openssl-dev \ | ||
pcre2-dev \ | ||
perl-dev \ | ||
zlib-dev | ||
|
||
RUN mkdir -p /usr/src \ | ||
&& wget https://nginx.org/download/nginx-${NGINX_VERSION}.tar.gz -O nginx.tar.gz \ | ||
&& wget https://github.com/yaoweibin/ngx_http_substitutions_filter_module/archive/master.tar.gz -O nginx_substitutions_filter.tar.gz \ | ||
&& tar -zxC /usr/src -f nginx.tar.gz \ | ||
&& tar -zxC /usr/src -f nginx_substitutions_filter.tar.gz \ | ||
&& rm nginx.tar.gz \ | ||
&& rm nginx_substitutions_filter.tar.gz \ | ||
&& cd /usr/src/nginx-$NGINX_VERSION \ | ||
&& bash -c 'set -eux && eval ./configure $(nginx -V 2>&1 | sed -n -e "s/^.*configure arguments: //p") --add-dynamic-module=/usr/src/ngx_http_substitutions_filter_module-master' \ | ||
&& make \ | ||
&& make install | ||
|
||
FROM nginx:${NGINX_VERSION}-alpine-perl | ||
|
||
COPY --from=builder /usr/lib/nginx/modules/ngx_http_subs_filter_module.so /usr/lib/nginx/modules/ngx_http_subs_filter_module.so | ||
|
||
RUN sed -i '1iload_module /usr/lib/nginx/modules/ngx_http_subs_filter_module.so;\n' /etc/nginx/nginx.conf | ||
|
||
EXPOSE 80 | ||
STOPSIGNAL SIGTERM | ||
|
||
CMD ["nginx", "-g", "daemon off;"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters