From: W. Trevor King Date: Wed, 29 Oct 2014 04:49:26 +0000 (-0700) Subject: thumbor: Add a Thumbor image (Docker) for manipulating images (pictures) X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=1b42257f47073518e1960ea2f1ecd190002c5962;p=dockerfile.git thumbor: Add a Thumbor image (Docker) for manipulating images (pictures) Open-source, smart, on-demand image cropping, resizing and filters. --- diff --git a/README.md b/README.md index 38199d1..45472e9 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,7 @@ The dependency graph is: |-- redis (adds Redis) |-- salt-minion (adds a Salt Stack minion) |-- stunnel (adds stunnel) + |-- thumbor (adds Thumbor) `-- gentoo-java (adds IcedTea) `-- elasticsearch (adds Elasticsearch) diff --git a/build.sh b/build.sh index 829a0a6..74eefb9 100755 --- a/build.sh +++ b/build.sh @@ -67,6 +67,7 @@ REPOS="${REPOS:- redis salt-minion stunnel + thumbor }" die() diff --git a/thumbor/Dockerfile.template b/thumbor/Dockerfile.template new file mode 100644 index 0000000..c9c4cb9 --- /dev/null +++ b/thumbor/Dockerfile.template @@ -0,0 +1,46 @@ +# Copyright (C) 2014 W. Trevor King +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are met: +# +# * Redistributions of source code must retain the above copyright notice, this +# list of conditions and the following disclaimer. +# +# * Redistributions in binary form must reproduce the above copyright notice, +# this list of conditions and the following disclaimer in the documentation +# and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE +# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +# POSSIBILITY OF SUCH DAMAGE. + +FROM ${NAMESPACE}/gentoo-layman:${TAG} +MAINTAINER ${MAINTAINER} +#VOLUME ["${PORTAGE}:/usr/portage:ro", "${PORTAGE}/distfiles:/usr/portage/distfiles:rw"] +RUN sed -i 's/\(PYTHON_TARGETS\)=.*/\1="python2_7"/' /etc/portage/make.conf +RUN sed -i 's/\(PYTHON_SINGLE_TARGET\)=.*/\1="python2_7"/' /etc/portage/make.conf +RUN echo 'USE_PYTHON="2.7"' >> /etc/portage/make.conf +RUN emerge -v --newuse --deep --with-bdeps=y @system @world +RUN echo 'YES' | etc-update --automode -9 +# https://bugs.gentoo.org/show_bug.cgi?id=526528 +RUN rm /etc/layman/._* +RUN eselect python set $(eselect python show --python2) +RUN echo 'USE="${USE} jpeg tiff truetype webp"' >> /etc/portage/make.conf +RUN layman --add wtk +COPY package.accept_keywords /etc/portage/package.accept_keywords/thumbor +RUN emerge -v dev-python/thumbor +RUN eselect news read new +# Currently no syslog support, so don't bother +# https://github.com/thumbor/thumbor/issues/377 +#RUN rc-update add thumbor default + +EXPOSE 8888 +CMD thumbor --port 8888 --conf /etc/thumbor/thumbor.conf diff --git a/thumbor/README.md b/thumbor/README.md new file mode 100644 index 0000000..de819d6 --- /dev/null +++ b/thumbor/README.md @@ -0,0 +1,13 @@ +Run this [Thumbor][] image with: + + $ docker run -d --name thumbor-0 -p 80:8888 wking/thumbor + +Which sets up a local thumbor instance powered by [Pillow][] and +[OpenCV][]. For details on using Thumbor, see the [quickstart][] and +[docs][]. + +[Thumbor]: http://thumbor.org/ +[Pillow]: http://python-pillow.github.io/ +[OpenCV]: http://docs.opencv.org/ +[quickstart]: https://github.com/thumbor/thumbor/wiki/Getting-started +[docs]: https://github.com/thumbor/thumbor/wiki diff --git a/thumbor/package.accept_keywords b/thumbor/package.accept_keywords new file mode 100644 index 0000000..e9c38e5 --- /dev/null +++ b/thumbor/package.accept_keywords @@ -0,0 +1,10 @@ +# required by thumbor (argument) +=dev-python/thumbor-9999 ~amd64 + +# required by dev-python/thumbor-9999::wtk +# required by thumbor (argument) +=dev-python/derpconf-9999 ~amd64 +=dev-python/pillow-2.3.1 ~amd64 +=dev-python/python-magic-0.4.6-r1 ~amd64 +=dev-python/thumbor-pexif-0.14.1 ~amd64 +=media-libs/opencv-2.4.9 ~amd64