Skip to content

Commit c127982

Browse files
committed
static-nginx
1 parent 72e6210 commit c127982

2 files changed

Lines changed: 48 additions & 15 deletions

File tree

static-nginx.Dockerfile

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,39 @@ SHELL ["/bin/ash", "-euxo", "pipefail", "-c"]
2121
WORKDIR /usr/src
2222

2323
RUN echo ">> Install build packages ..." && \
24-
apk add --no-cache \
25-
build-base \
24+
apk add --no-cache --virtual .build-deps \
25+
linux-headers \
2626
musl-dev \
27+
\
28+
ca-certificates \
2729
wget \
30+
g++ \
31+
make \
2832
perl \
29-
coreutils \
30-
linux-headers \
31-
bash \
32-
libtool \
33+
file \
34+
tree \
35+
\
3336
autoconf \
3437
automake \
38+
libtool \
3539
\
36-
geoip-dev \
37-
geoip-static \
40+
#geoip-dev geoip-static \
3841
&& \
3942
mkdir -p ${OUTPUT_DIR}
4043

44+
# https://github.com/maxmind/geoip-api-c
45+
RUN GEOIP1_VERSION=1.6.12 && \
46+
echo ">> Download and compile: GeoIP V1 ${GEOIP1_VERSION} ..." && \
47+
wget https://github.com/maxmind/geoip-api-c/archive/refs/tags/v${GEOIP1_VERSION}.tar.gz && \
48+
tar xf v${GEOIP1_VERSION}.tar.gz && \
49+
rm v${GEOIP1_VERSION}.tar.gz && \
50+
cd geoip-api-c-${GEOIP1_VERSION} && \
51+
./bootstrap && \
52+
./configure --enable-static --disable-shared && \
53+
make -j$(nproc) && \
54+
make install && \
55+
cd ..
56+
4157
# https://github.com/PCRE2Project/pcre2
4258
RUN echo ">> Download: pcre2-${PCRE2_VERSION} ..." && \
4359
wget https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${PCRE2_VERSION}/pcre2-${PCRE2_VERSION}.tar.gz && \

static-nginx.unprivileged-nginxuser.Dockerfile

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,22 +21,39 @@ SHELL ["/bin/ash", "-euxo", "pipefail", "-c"]
2121
WORKDIR /usr/src
2222

2323
RUN echo ">> Install build packages ..." && \
24-
apk add --no-cache \
25-
build-base \
24+
apk add --no-cache --virtual .build-deps \
25+
linux-headers \
2626
musl-dev \
27+
\
28+
ca-certificates \
2729
wget \
30+
g++ \
31+
make \
2832
perl \
29-
coreutils \
30-
linux-headers \
31-
bash \
32-
libtool \
33+
file \
34+
tree \
35+
\
3336
autoconf \
3437
automake \
38+
libtool \
3539
\
36-
geoip-dev geoip-static \
40+
#geoip-dev geoip-static \
3741
&& \
3842
mkdir -p ${OUTPUT_DIR}
3943

44+
# https://github.com/maxmind/geoip-api-c
45+
RUN GEOIP1_VERSION=1.6.12 && \
46+
echo ">> Download and compile: GeoIP V1 ${GEOIP1_VERSION} ..." && \
47+
wget https://github.com/maxmind/geoip-api-c/archive/refs/tags/v${GEOIP1_VERSION}.tar.gz && \
48+
tar xf v${GEOIP1_VERSION}.tar.gz && \
49+
rm v${GEOIP1_VERSION}.tar.gz && \
50+
cd geoip-api-c-${GEOIP1_VERSION} && \
51+
./bootstrap && \
52+
./configure --enable-static --disable-shared && \
53+
make -j$(nproc) && \
54+
make install && \
55+
cd ..
56+
4057
# https://github.com/PCRE2Project/pcre2
4158
RUN echo ">> Download: pcre2-${PCRE2_VERSION} ..." && \
4259
wget https://github.com/PCRE2Project/pcre2/releases/download/pcre2-${PCRE2_VERSION}/pcre2-${PCRE2_VERSION}.tar.gz && \

0 commit comments

Comments
 (0)