Giter Site home page Giter Site logo

sachk / docker-alpine-nginx-pagespeed Goto Github PK

View Code? Open in Web Editor NEW

This project forked from wernight/docker-alpine-nginx-pagespeed

0.0 1.0 1.0 16 KB

Dockerized Nginx with PageSpeed Module on Alpine Linux

Home Page: https://hub.docker.com/r/wernight/alpine-nginx-pagespeed/

License: Apache License 2.0

Dockerfile 100.00%

docker-alpine-nginx-pagespeed's Introduction

Supported tags and respective Dockerfile links

  • v1, v1.11, v1.11.33.3 and similar are tagged versions of Nginx PageSpeed (with a compatible Nginx).
  • latest (Dockerfile)

What is Nginx with PageSpeed Module

This is a Dockerized image of Nginx with PageSpeed Module based on Alpine Linux.

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).
  • Cache and prioritize visible content or defer JavaScript.
  • Combine or inline CSS/JavaScript.
  • Flush resources early
  • Clean-up HTML by removing unnecessary tags.
  • ...

You can see PageSpeed documentation for more details and settings.

Usage example

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. /srv/).

Notes

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).

Feedbacks

Suggestions are welcome on our GitHub issue tracker.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.