Skip to content

Commit

Permalink
Adapt compilation step to Debian
Browse files Browse the repository at this point in the history
  • Loading branch information
itskingori committed Jan 18, 2024
1 parent 248e1ab commit 1a85f4e
Showing 1 changed file with 12 additions and 21 deletions.
33 changes: 12 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,15 @@ FROM zappi/nginx:1.25.3 as builder

USER root

# Install build dependencies
RUN apk add --no-cache \
alpine-sdk \
bash \
findutils \
gcc \
gd-dev \
geoip-dev \
libc-dev \
libedit-dev \
libxslt-dev \
linux-headers \
make \
mercurial \
openssl-dev \
pcre-dev \
perl-dev \
zlib-dev
RUN apt-get update -y && \
apt-get install --no-install-recommends -y \
build-essential \
ca-certificates \
libpcre3 \
libpcre3-dev \
wget \
zlib1g \
zlib1g-dev

WORKDIR /usr/src/

Expand All @@ -43,9 +34,9 @@ RUN wget "https://github.com/openresty/headers-more-nginx-module/archive/${HEADE

# Compile nginx with headers-more module using original configure arguments
RUN cd nginx && \
CONFIGURATION_ARGUMENTS=$(nginx -V 2>&1 | sed -n -e 's/^.*arguments: //p') && \
sh -c "./configure --with-compat ${CONFIGURATION_ARGUMENTS} --add-dynamic-module=/usr/src/headers-more" && \
make modules
./configure --add-dynamic-module=/usr/src/headers-more && \
make && \
make install

# Production container starts here
FROM zappi/nginx:1.25.3
Expand Down

0 comments on commit 1a85f4e

Please sign in to comment.