Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Changelog

## 1.25.3

* Use `zappi/nginx:1.25.3` as the docker base image.
* Upgrade `headers-more-nginx-module` to `v0.37`.

## 1.25.2-3

* Log `X-Proxy-Backend` latency headers.
Expand Down
2 changes: 1 addition & 1 deletion CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @Intellection/sre
* @Intellection/SRE
42 changes: 16 additions & 26 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,54 +1,44 @@
FROM zappi/nginx:1.25.2 as builder
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/

# Download nginx source
ARG NGINX_VERSION="1.25.2"
ARG NGINX_VERSION="1.25.3"
ARG NGINX_PKG="nginx-${NGINX_VERSION}.tar.gz"
ARG NGINX_SHA="05dd6d9356d66a74e61035f2a42162f8c754c97cf1ba64e7a801ba158d6c0711"
ARG NGINX_SHA="64c5b975ca287939e828303fa857d22f142b251f17808dfe41733512d9cded86"

RUN wget "http://nginx.org/download/${NGINX_PKG}" && \
echo "${NGINX_SHA} *${NGINX_PKG}" | sha256sum -c - && \
tar --no-same-owner -xzf ${NGINX_PKG} --one-top-level=nginx --strip-components=1

# Download headers-more module source
ARG HEADERS_MORE_VERSION="0.34"
ARG HEADERS_MORE_VERSION="0.37"
ARG HEADERS_MORE_PKG="v${HEADERS_MORE_VERSION}.tar.gz"
ARG HEADERS_MORE_SHA="0c0d2ced2ce895b3f45eb2b230cd90508ab2a773299f153de14a43e44c1209b3"
ARG HEADERS_MORE_SHA="cf6e169d6b350c06d0c730b0eaf4973394026ad40094cddd3b3a5b346577019d"

RUN wget "https://github.com/openresty/headers-more-nginx-module/archive/${HEADERS_MORE_PKG}" && \
echo "${HEADERS_MORE_SHA} *${HEADERS_MORE_PKG}" | sha256sum -c - && \
tar --no-same-owner -xzf ${HEADERS_MORE_PKG} --one-top-level=headers-more --strip-components=1

# 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" && \
./configure --with-compat --add-dynamic-module=/usr/src/headers-more && \
make modules

# Production container starts here
FROM zappi/nginx:1.25.2
FROM zappi/nginx:1.25.3

# Copy compiled module
COPY --from=builder /usr/src/nginx/objs/*_module.so /etc/nginx/modules/
Expand Down