mirror of
https://github.com/jessfraz/dockerfiles.git
synced 2024-11-23 11:31:49 +01:00
420323634a
Signed-off-by: Jess Frazelle <acidburn@google.com>
38 lines
790 B
Docker
38 lines
790 B
Docker
# guetzli
|
|
#
|
|
# docker run --rm -it \
|
|
# -v ${PWD}:/tmp \
|
|
# r.j3ss.co/guetzli:latest \
|
|
# --verbose /tmp/example.jpg /tmp/example.compressed.jpg
|
|
|
|
FROM alpine:latest
|
|
LABEL maintainer "Christian Koep <christian.koep@fom-net.de>"
|
|
|
|
RUN apk --no-cache add \
|
|
libpng \
|
|
libstdc++ \
|
|
libgcc
|
|
|
|
ENV GUETZLI_VERSION v1.0.1
|
|
ENV APPDIR /usr/src/guetzli
|
|
|
|
RUN buildDeps=' \
|
|
g++ \
|
|
git \
|
|
libpng-dev \
|
|
make \
|
|
' \
|
|
set -x \
|
|
&& apk --no-cache add $buildDeps \
|
|
&& git clone --depth 1 --branch "${GUETZLI_VERSION}" "https://github.com/google/guetzli.git" "${APPDIR}" \
|
|
&& ( \
|
|
cd "${APPDIR}" \
|
|
&& make \
|
|
&& mv "${APPDIR}/bin/Release/guetzli" /usr/local/bin/guetzli \
|
|
) \
|
|
&& apk del $buildDeps \
|
|
&& rm -rf "${APPDIR}" \
|
|
&& echo "Build complete."
|
|
|
|
ENTRYPOINT [ "/usr/local/bin/guetzli" ]
|