thumbor: Add a Thumbor image (Docker) for manipulating images (pictures)
authorW. Trevor King <wking@tremily.us>
Wed, 29 Oct 2014 04:49:26 +0000 (21:49 -0700)
committerW. Trevor King <wking@tremily.us>
Wed, 29 Oct 2014 22:53:27 +0000 (15:53 -0700)
Open-source, smart, on-demand image cropping, resizing and filters.

README.md
build.sh
thumbor/Dockerfile.template [new file with mode: 0644]
thumbor/README.md [new file with mode: 0644]
thumbor/package.accept_keywords [new file with mode: 0644]

index 38199d1c80809a85abbced835120371594378a42..45472e93884fb1234569a2d1eeb6e8b0f1fa5917 100644 (file)
--- 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)
 
index 829a0a6c25bd60bccc4efd91b1adbcc9e903fb29..74eefb910b368bd6731dcd8a7f6a0eb59b0788ad 100755 (executable)
--- 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 (file)
index 0000000..c9c4cb9
--- /dev/null
@@ -0,0 +1,46 @@
+# Copyright (C) 2014 W. Trevor King <wking@tremily.us>
+#
+# 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 (file)
index 0000000..de819d6
--- /dev/null
@@ -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 (file)
index 0000000..e9c38e5
--- /dev/null
@@ -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