Browse Source

added ocr configuration(not yet working

Harsh Parikh 2 năm trước cách đây
mục cha
commit
a2536f9e15
2 tập tin đã thay đổi với 27 bổ sung0 xóa
  1. 9 0
      docker/Dockerfile
  2. 18 0
      docker/install.sh

+ 9 - 0
docker/Dockerfile

@@ -0,0 +1,9 @@
+FROM java:latest
+LABEL Matt Fullerton <matt.fullerton@gmail.com>
+RUN mkdir /setup
+RUN ["chmod", "a+x", "install.sh"]
+ADD install.sh /setup/install.sh
+RUN /setup/install.sh
+ENTRYPOINT java -jar /srv/tika-server-1.*-SNAPSHOT.jar -host 0.0.0.0
+
+EXPOSE 9998

+ 18 - 0
docker/install.sh

@@ -0,0 +1,18 @@
+
+echo "# Installing Maven"
+apt-get update
+apt-get -y -q install default-jdk maven unzip
+
+echo "# Installing Tika"
+mkdir install
+curl https://codeload.github.com/apache/tika/zip/trunk -o trunk.zip
+unzip trunk.zip
+cd tika-trunk
+mvn -DskipTests=true clean install
+cp tika-server/target/tika-server-1.*-SNAPSHOT.jar /srv/tika-server-1.*-SNAPSHOT.jar
+
+echo "#Installing tesseract"
+apt-get -y -q install tesseract-ocr tesseract-ocr-deu tesseract-ocr-eng
+
+echo "# Cleaning up"
+apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /setup /build