Sign inSign up

tinawng/nginx-static-compressed

By tinawng

•Updated 11 months ago

Based on flashspys/nginx-static with added support for pre-compressed gzip and brotli files.

Image
Web servers
0

401

tinawng/nginx-static-compressed repository overview

⁠Super Lightweight Nginx Image with Compressed Files Support

Based on https://hub.docker.com/r/flashspys/nginx-static⁠ With added support for pre-compressed gzip and brotli files.

⁠Usage example
FROM alpine:latest as base
WORKDIR /usr/src/app

FROM base AS prerelease
# build static website
...
# compress
RUN apt install brotli
RUN find dist/ \( -iname '*.html' -o -iname '*.css' -o -iname '*.js' \) -exec bash -c 'brotli --best "$0"' {} \;
RUN find dist/ \( -iname '*.html' -o -iname '*.css' -o -iname '*.js' \) -exec bash -c 'gzip -k --best "$0"' {} \;

FROM tinawng/nginx-static-compressed:latest AS release
COPY --from=prerelease /usr/src/app/dist /static
⁠Source

https://git.tina.cafe/Tina/docker-nginx-static-compressed/src/branch/main⁠

Tag summary

Content type

Image

Digest

sha256:84ed9964e…

Size

11.6 MB

Last updated

11 months ago

docker pull tinawng/nginx-static-compressed