Skip to content

Commit

Permalink
Switch to nginx from buster, which is new enough
Browse files Browse the repository at this point in the history
  • Loading branch information
jerith committed Apr 3, 2023
1 parent a96808c commit 05a5ab0
Showing 1 changed file with 1 addition and 27 deletions.
28 changes: 1 addition & 27 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,33 +14,7 @@ RUN pip wheel -w /wheels -r /requirements.txt
FROM ghcr.io/praekeltfoundation/vumi-base:0.1.1
MAINTAINER Praekelt Foundation <[email protected]>

# TODO: Do we want a newer nginx?
# Install a modern Nginx
ENV NGINX_VERSION=1.14.2 \
NGINX_GPG_KEY=573BFD6B3D8FBC641079A6ABABF5BD827BD9BF62
RUN set -ex; \
fetchDeps=" \
wget \
$(command -v gpg > /dev/null || echo 'dirmngr gnupg') \
"; \
apt-get-install.sh $fetchDeps; \
wget https://nginx.org/keys/nginx_signing.key; \
[ "$(gpg -q --with-fingerprint --with-colons nginx_signing.key | awk -F: '/^fpr:/ { print $10 }')" \
= $NGINX_GPG_KEY ]; \
apt-key add nginx_signing.key; \
codename="$(. /etc/os-release; echo $VERSION | grep -oE [a-z]+)"; \
echo "deb http://nginx.org/packages/debian/ $codename nginx" > /etc/apt/sources.list.d/nginx.list; \
rm nginx_signing.key; \
apt-get-purge.sh $fetchDeps; \
\
apt-get-install.sh "nginx=$NGINX_VERSION-1\~$codename"; \
# Delete default server
rm /etc/nginx/conf.d/default.conf; \
# Create directories for Junebug frontends/upstreams
mkdir -p /etc/nginx/includes/junebug; \
# Forward Nginx access and error logs to stdout/err
ln -sf /dev/stdout /var/log/nginx/access.log; \
ln -sf /dev/stderr /var/log/nginx/error.log
RUN apt-get-install.sh nginx

COPY requirements.txt /requirements.txt
COPY --from=builder /wheels /wheels
Expand Down

0 comments on commit 05a5ab0

Please sign in to comment.