Skip to content

Instantly share code, notes, and snippets.

@oxr463
Last active April 16, 2021 15:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oxr463/e6bd0837843bad3dea88939a82266b96 to your computer and use it in GitHub Desktop.
Save oxr463/e6bd0837843bad3dea88939a82266b96 to your computer and use it in GitHub Desktop.
NGINX gzip compression testing image
# SPDX-License-Identifier: MIT
FROM alpine:latest
# Install nginx and enable gzip compression
RUN apk update && \
apk upgrade && \
apk add nginx && \
mkdir -p /run/nginx && \
touch /run/nginx/nginx.pid && \
sed -i 's/#gzip on;/gzip on;/g' /etc/nginx/nginx.conf
EXPOSE 80
CMD /usr/sbin/nginx && tail -f /var/log/nginx/*.log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment