dockerfiles/guetzli/Dockerfile

38 lines
788 B
Docker
Raw Normal View History

2017-03-23 18:19:17 +01:00
# guetzli
#
# docker run --rm -it \
# -v ${PWD}:/tmp \
# r.j3ss.co/guetzli:latest \
# --verbose /tmp/example.jpg /tmp/example.compressed.jpg
2017-03-23 18:19:17 +01:00
FROM alpine:latest
2017-04-04 09:19:34 +02:00
LABEL maintainer "Christian Koep <christiankoep@gmail.com>"
2017-03-23 18:19:17 +01:00
RUN apk --no-cache add \
libpng \
libstdc++ \
libgcc
2017-03-23 18:19:17 +01:00
ENV GUETZLI_VERSION v1.0.1
ENV APPDIR /usr/src/guetzli
RUN buildDeps=' \
g++ \
git \
libpng-dev \
make \
2017-03-23 18:19:17 +01:00
' \
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 \
) \
2017-03-23 18:19:17 +01:00
&& apk del $buildDeps \
&& rm -rf "${APPDIR}" \
2017-03-23 18:19:17 +01:00
&& echo "Build complete."
ENTRYPOINT [ "/usr/local/bin/guetzli" ]