-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
32 lines (27 loc) · 1.26 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
ARG TARGETPLATFORM
FROM alpine:3.18
ARG TARGETARCH
LABEL [email protected]
# https://github.com/cubicdaiya/nginx-build
ENV NGINX_BUILD=0.13.1
ENV NGINX_VER=1.25.2
ENV ZLIB_VERSION=1.3
RUN mkdir /usr/local/src /usr/local/share/GeoIP
ADD config /config
WORKDIR /usr/local/src
RUN apk add --update openssl-dev git curl geoip-dev file wget \
&& apk add --virtual build-deps build-base ruby-rake bison perl \
&& curl -L https://github.com/cubicdaiya/nginx-build/releases/download/v$NGINX_BUILD/nginx-build-linux-${TARGETARCH}-$NGINX_BUILD.tar.gz -o nginx-build.tar.gz \
&& tar xvzf nginx-build.tar.gz \
&& ./nginx-build -verbose -v $NGINX_VER -d work -pcre -zlib -zlibversion=$ZLIB_VERSION -m /config/modules3rd.json -c /config/configure.sh --clear \
&& cd work/nginx/$NGINX_VER/nginx-$NGINX_VER \
&& make install \
&& apk del build-deps \
&& mv ../ngx_mruby/mruby/bin/* /usr/local/bin/ \
&& rm -rf /var/cache/apk/* /usr/local/src/*
# RUN cd /usr/local/share/GeoIP \
# && wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCity.dat.gz && gunzip GeoLiteCity.dat.gz \
# && wget -N http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz && gunzip GeoIP.dat.gz
EXPOSE 8080
WORKDIR /usr/local/nginx
CMD ["/bin/sh"]