From ff6e498e0e276417e6ee7a70e870ebb7b786cd28 Mon Sep 17 00:00:00 2001 From: kev Date: Fri, 8 Jan 2021 12:19:35 +0800 Subject: [PATCH] add tabula --- README.md | 1 + tabula/Dockerfile | 27 +++++++++++++++++++++++++++ tabula/README.md | 6 ++++++ tabula/docker-compose.yml | 7 +++++++ 4 files changed, 41 insertions(+) create mode 100644 tabula/Dockerfile create mode 100644 tabula/README.md create mode 100644 tabula/docker-compose.yml diff --git a/README.md b/README.md index c42be27..6213a11 100644 --- a/README.md +++ b/README.md @@ -192,6 +192,7 @@ A collection of delicious docker recipes. - [x] phpvirtualbox-arm - [x] piwik - [x] revive +- [x] tabula - [x] tiddlywiki - [x] zoneminder :+1: diff --git a/tabula/Dockerfile b/tabula/Dockerfile new file mode 100644 index 0000000..dc5632d --- /dev/null +++ b/tabula/Dockerfile @@ -0,0 +1,27 @@ +# +# Dockerfile for tabula +# + +FROM jruby:9.2-jdk +MAINTAINER EasyPi Software Foundation + +RUN apt-get update -qq && apt-get install -y build-essential curl \ + && apt-get clean && rm -rf /var/lib/apt/lists/* +RUN echo 'gem: --no-rdoc --no-ri' >> /.gemrc + +ENV GEM_HOME=/usr/local/bundle +ENV PATH=$GEM_HOME/bin:$PATH +RUN gem install bundler -v '< 2' \ + && bundle config --global path "$GEM_HOME" \ + && bundle config --global bin "$GEM_HOME/bin" + +# don't create ".bundle" in all our apps +ENV BUNDLE_APP_CONFIG=$GEM_HOME + +WORKDIR /app +# these didn't work as ONBUILD, strangely. Idk why. -JBM +RUN curl -sSL https://github.com/tabulapdf/tabula/archive/master.tar.gz | tar xz --strip 1 +RUN bundle install && jruby -S jbundle install + +EXPOSE 9292 +CMD ["jruby", "-G", "-r", "jbundler", "-S", "rackup", "-o", "0.0.0.0", "config.ru"] diff --git a/tabula/README.md b/tabula/README.md new file mode 100644 index 0000000..002b709 --- /dev/null +++ b/tabula/README.md @@ -0,0 +1,6 @@ +tabula +====== + +[Tabula][1] is a tool for liberating data tables trapped inside PDF files. + +[1]: http://tabula.technology/ diff --git a/tabula/docker-compose.yml b/tabula/docker-compose.yml new file mode 100644 index 0000000..76e4cae --- /dev/null +++ b/tabula/docker-compose.yml @@ -0,0 +1,7 @@ +version: "3.8" +services: + tabula: + image: vimagick/tabula + ports: + - "9292:9292" + restart: unless-stopped