Sign inSign up

milania/brotli

By milania

•Updated about 1 year ago

Command line tool for brotli compression.

Image
Web servers
0

517

milania/brotli repository overview

The docker image contains every file generated in the build process of brotli (i.e. files in the bin, lib and include folders) stored in /usr/local/bin.

To use the command line tool run docker run --rm -v "$(pwd):/mnt/volume" milania/brotli "[OPTION]... [FILE]..." where you can use brotli on every file in the current directory. E.g. to show the version number docker run --rm -v "$(pwd):/mnt/volume" milania/brotli "--version" or compress a file docker run --rm -v "$(pwd):/mnt/volume" milania/brotli "my_file.txt"

Dockerfile used to build the image:

FROM ubuntu:24.04 AS builder

MAINTAINER Milania

RUN DEBIAN_FRONTEND="noninteractive" apt update && apt-get -y install tzdata

# Build brotli
RUN apt-get update && apt-get install -y \
       build-essential \
       cmake \
       git \
    && mkdir /brotli_install && cd /brotli_install \
    && git clone https://github.com/google/brotli.git && cd brotli \
    && git checkout tags/v1.1.0 \
    && mkdir out && cd out \
    && cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/brotli_install/files .. \
    && cmake --build . --config Release --target install

FROM ubuntu:24.04

# Copy all generated files from the build process (bin, lib, include) to a fresh new image
COPY --from=builder /brotli_install/files /brotli

ENV PATH="${PATH}:/brotli/bin"
ENV LD_LIBRARY_PATH="/brotli/lib"

# This is the place where the shared volume is supposed to be mounted
WORKDIR /mnt/volume

ENTRYPOINT ["brotli"]

Tag summary

Content type

Image

Digest

sha256:2893a8df4…

Size

27.9 MB

Last updated

about 1 year ago

docker pull milania/brotli