Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 1.45 KB

README.md

File metadata and controls

34 lines (22 loc) · 1.45 KB

Container Web Static Compressor

An "oneshot" container to recursively compress files statically with these compression algorithms:

Always using the highest and best compression (that does not affect the decompression too badly).

The output is modified in place. Please use a webserver of your choice (ideally of course one that supports the static file delivery, like caddy) to serve these files.

Arguments

  • COMPRESSOR_DIRECTORY – you can use this to specify the directory to compress as an environmental variable

Alternatively, you can pass the first parameter as an argument to the container and it compresses this directory. Only one directory can (recursively) be provided, currently.

If no arguments are passed, /app is the directory assumed it tries to compress.

Example usage

This example uses podman, but you can replace the command with docker and that should work, too.

It also outputs the files when running the container:

podman run -v $PWD/app:/app:Z container-web-static-compressor:latest /app

Build it by yourself

podman build . -t container-web-static-compressor:latest