[ https://issues.apache.org/jira/browse/TIKA-1518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16385112#comment-16385112 ]
ASF GitHub Bot commented on TIKA-1518: -------------------------------------- dameikle closed pull request #227: TIKA-1518: Add local docker build based on dockerfile-maven-plugin URL: https://github.com/apache/tika/pull/227 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of provenance: As this is a foreign pull request (from a fork), the diff is supplied below (as it won't show otherwise due to GitHub magic): diff --git a/tika-server/Dockerfile b/tika-server/Dockerfile index f197d142e..279fff0d1 100644 --- a/tika-server/Dockerfile +++ b/tika-server/Dockerfile @@ -13,25 +13,20 @@ # specific language governing permissions and limitations # under the License. -FROM ubuntu:latest +FROM ubuntu:xenial MAINTAINER Apache Tika Team -ENV TIKA_VERSION 1.7 -ENV TIKA_SERVER_URL https://www.apache.org/dist/tika/tika-server-$TIKA_VERSION.jar - RUN apt-get update \ - && apt-get install openjdk-7-jre-headless curl gdal-bin tesseract-ocr \ - tesseract-ocr-eng tesseract-ocr-ita tesseract-ocr-fra tesseract-ocr-spa tesseract-ocr-deu -y \ - && curl -sSL https://people.apache.org/keys/group/tika.asc -o /tmp/tika.asc \ - && gpg --import /tmp/tika.asc \ - && curl -sSL "$TIKA_SERVER_URL.asc" -o /tmp/tika-server-${TIKA_VERSION}.jar.asc \ - && NEAREST_TIKA_SERVER_URL=$(curl -sSL http://www.apache.org/dyn/closer.cgi/${TIKA_SERVER_URL#https://www.apache.org/dist/}\?asjson\=1 \ - | awk '/"path_info": / { pi=$2; }; /"preferred":/ { pref=$2; }; END { print pref " " pi; };' \ - | sed -r -e 's/^"//; s/",$//; s/" "//') \ - && echo "Nearest mirror: $NEAREST_TIKA_SERVER_URL" \ - && curl -sSL "$NEAREST_TIKA_SERVER_URL" -o /tika-server-${TIKA_VERSION}.jar \ - && gpg --verify /tmp/tika-server-${TIKA_VERSION}.jar.asc /tika-server-${TIKA_VERSION}.jar \ + && apt-get install openjdk-8-jre-headless curl gdal-bin tesseract-ocr \ + tesseract-ocr-eng tesseract-ocr-ita tesseract-ocr-fra tesseract-ocr-spa tesseract-ocr-deu -y \ && apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* +ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64 +RUN export JAVA_HOME + +ARG JAR_FILE +ADD target/${JAR_FILE} /tika-server.jar + EXPOSE 9998 -ENTRYPOINT java -jar /tika-server-${TIKA_VERSION}.jar -h 0.0.0.0 +ENTRYPOINT java -jar /tika-server.jar -h 0.0.0.0 + diff --git a/tika-server/pom.xml b/tika-server/pom.xml index 985387951..6fc38694e 100644 --- a/tika-server/pom.xml +++ b/tika-server/pom.xml @@ -260,6 +260,26 @@ </execution> </executions> </plugin> + <plugin> + <groupId>com.spotify</groupId> + <artifactId>dockerfile-maven-plugin</artifactId> + <version>1.3.7</version> + <executions> + <execution> + <id>default</id> + <goals> + <goal>build</goal> + </goals> + </execution> + </executions> + <configuration> + <repository>apache/tika</repository> + <tag>${project.version}</tag> + <buildArgs> + <JAR_FILE>tika-server-${project.version}.jar</JAR_FILE> + </buildArgs> + </configuration> + </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org > Docker with Tika Server > ----------------------- > > Key: TIKA-1518 > URL: https://issues.apache.org/jira/browse/TIKA-1518 > Project: Tika > Issue Type: New Feature > Reporter: Paul Ramirez > Assignee: Dave Meikle > Priority: Major > Fix For: 2.0, 1.17 > > > This version should be able to demonstrate as many of Apache Tika's > capabilities as possible. For instance with GDAL, Tesseract, and FFmpeg to > show parsers which require installation of other dependencies. In addition, > this should help move TIKA-1301 forward and should leverage the suggestion > made by [~lewismc] of a script which can pull down the latest version of > Apache Tika. -- This message was sent by Atlassian JIRA (v7.6.3#76005)