Supported tags and respective
v18.104.22.168and similar are tagged versions of Nginx PageSpeed (with a compatible Nginx).
What is Nginx with PageSpeed Module
PageSpeed Module (for Nginx) (aka ngx_pagespeed) performs a lot of optimizations for websites by default (i.e. without doing anything outside of switching Nginx with this version) like:
- Minify CSS/JS/HTML/images resources (e.g. recompressed images to webp if the client's browser supports it).
- Flush resources early
- Clean-up HTML by removing unnecessary tags.
You can see PageSpeed documentation for more details and settings.
Configuration is very similar to the official Nginx image.
$ docker run -d -p 80:80 wernight/alpine-nginx-pagespeed
You probably want to create a
Dockerfile based on this image or mount required resources. Most importantly you'd want to customize
/etc/nginx/nginx.conf and mount static files to your web root (e.g.
There is already an official Nginx based on Alpine Linux however there is no current simple way to add mod PageSpeed to it. We need to build it together with Nginx, and the smallest image for that, supporting automated builds on Docker Hub, is Linux Alpine.
There is also no official build documentation for Alpine Linux (see ngx_pagespeed #1181).
Suggestions are welcome on our GitHub issue tracker.