commit
cb5435cee3
|
@ -0,0 +1,4 @@
|
||||||
|
Dockerfile
|
||||||
|
.dockerignore
|
||||||
|
.git*
|
||||||
|
*.md
|
|
@ -0,0 +1,43 @@
|
||||||
|
FROM alpine:3.5
|
||||||
|
|
||||||
|
# Permanent dependencies (runtime)
|
||||||
|
#RUN \
|
||||||
|
# apk add --no-cache \
|
||||||
|
# libpng
|
||||||
|
|
||||||
|
# Dev & build
|
||||||
|
ARG GFLAGS_VERSION=v2.2.0
|
||||||
|
ARG GUETZLI_VERSION=v1.0
|
||||||
|
RUN \
|
||||||
|
apk add --no-cache --virtual .build-deps \
|
||||||
|
libpng-dev \
|
||||||
|
alpine-sdk \
|
||||||
|
git \
|
||||||
|
coreutils \
|
||||||
|
cmake \
|
||||||
|
&&\
|
||||||
|
\
|
||||||
|
git clone "https://github.com/gflags/gflags.git" /var/tmp/gflags &&\
|
||||||
|
(cd /var/tmp/gflags &&\
|
||||||
|
git checkout "${GFLAGS_VERSION}" &&\
|
||||||
|
mkdir build &&\
|
||||||
|
cd build &&\
|
||||||
|
cmake .. &&\
|
||||||
|
make -j$(nproc) all install DESTDIR="/opt/build" \
|
||||||
|
) &&\
|
||||||
|
\
|
||||||
|
git clone "https://github.com/google/guetzli.git" /var/tmp/guetzli &&\
|
||||||
|
(cd /var/tmp/guetzli &&\
|
||||||
|
git checkout "${GUETZLI_VERSION}" &&\
|
||||||
|
make -j$(nproc) config=release \
|
||||||
|
TARGETDIR=/usr/local/bin \
|
||||||
|
LDFLAGS="-L/opt/build/usr/local/lib -static" \
|
||||||
|
CXXFLAGS="-I/opt/build/usr/local/include" \
|
||||||
|
CFLAGS="-I/opt/build/usr/local/include" \
|
||||||
|
CPPFLAGS="-I/opt/build/usr/local/include" \
|
||||||
|
) &&\
|
||||||
|
\
|
||||||
|
apk del --no-cache .build-deps &&\
|
||||||
|
rm -rf /var/tmp/* /tmp/* /opt/build
|
||||||
|
|
||||||
|
ENTRYPOINT ["guetzli"]
|
|
@ -0,0 +1,17 @@
|
||||||
|
# Guetzli Docker image
|
||||||
|
|
||||||
|
This image includes a static build of Guetzli, the perceptual JPEG encoder made by Google. The entrypoint is configured to point directly at the binary
|
||||||
|
so it is possible to use `docker run` on this image just as if you would use guetzli directly on your system.
|
||||||
|
|
||||||
|
## Available tags
|
||||||
|
|
||||||
|
All available tags are always listed [in Docker Hub](https://hub.docker.com/r/icedream/guetzli/tags), the list below explains the maintained tags:
|
||||||
|
|
||||||
|
- `latest`, `1`, `1.0`: Latest stable version.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
Running the encoder on an image on the host system:
|
||||||
|
|
||||||
|
docker run --rm -it -v "$(pwd):/work" -w /work icedream/guetzli \
|
||||||
|
example.jpg example_compressed.jpg
|
Loading…
Reference in New Issue