Dockerfiles for automated build

This commit is contained in:
Felix Lohmeier 2017-02-02 02:09:25 +01:00
parent 1fa395ba2d
commit e20dd45354
5 changed files with 136 additions and 2 deletions

20
2.6rc1/Dockerfile Normal file
View File

@ -0,0 +1,20 @@
FROM java:8-jre-alpine
MAINTAINER felixlohmeier <felixlohmeier@opencultureconsulting.de>
# OpenRefine 2.6 Release Candidate 1
# derived from docker image vimagick/openrefine for personal use
ENV OR_URL https://github.com/OpenRefine/OpenRefine/releases/download/v2.6-rc1/openrefine-linux-2.6-rc1.tar.gz
WORKDIR /app
RUN set -xe \
&& apk add --no-cache bash curl jq tar \
&& curl -sSL ${OR_URL} | tar xz --strip 1
VOLUME /data
WORKDIR /data
EXPOSE 3333
ENTRYPOINT ["/app/refine"]
CMD ["-i", "0.0.0.0", "-d", "/data"]

20
2.6rc2/Dockerfile Normal file
View File

@ -0,0 +1,20 @@
FROM java:8-jre-alpine
MAINTAINER felixlohmeier <felixlohmeier@opencultureconsulting.de>
# OpenRefine 2.6 Release Candidate 2
# derived from docker image vimagick/openrefine for personal use
ENV OR_URL https://github.com/OpenRefine/OpenRefine/releases/download/2.6-rc.2/openrefine-linux-2.6-rc.2.tar.gz
WORKDIR /app
RUN set -xe \
&& apk add --no-cache bash curl jq tar \
&& curl -sSL ${OR_URL} | tar xz --strip 1
VOLUME /data
WORKDIR /data
EXPOSE 3333
ENTRYPOINT ["/app/refine"]
CMD ["-i", "0.0.0.0", "-d", "/data"]

26
Dockerfile Normal file
View File

@ -0,0 +1,26 @@
FROM ubuntu:trusty
MAINTAINER felixlohmeier <felixlohmeier@opencultureconsulting.de>
# OpenRefine 2.6 Development Version
# derived from docker image psychemedia/openrefine for personal use
# Install JDK after updating installed packages.
RUN apt-get update && apt-get install -y wget ant unzip openjdk-7-jdk && apt-get clean
WORKDIR /app
#Build OpenRefine
RUN wget --no-check-certificate https://github.com/OpenRefine/OpenRefine/archive/master.zip
RUN unzip master.zip && rm master.zip
RUN OpenRefine-master/refine build
#Tidy up
RUN apt-get remove -y openjdk-7-jdk
RUN apt-get install openjdk-7-jre-headless
VOLUME /data
WORKDIR /data
EXPOSE 3333
ENTRYPOINT ["/app/OpenRefine-master/refine"]
CMD ["-i", "0.0.0.0", "-d", "/data"]

View File

@ -1,2 +1,39 @@
# openrefine-docker # OpenRefine-docker
OpenRefine is a free, open source power tool for working with messy data and improving it. This repository contains Dockerbuild files. [OpenRefine](http://openrefine.org/) is a free, open source power tool for working with messy data and improving it. These docker images are automatically build from released versions (2.6rc1, 2.6rc2) or from the official GitHub Repository (latest).
GitHub Repository with Docker
These docker images are inspired by docker image [vimagick/openrefine](https://hub.docker.com/r/vimagick/openrefine/) and [psychemedia/openrefine](https://hub.docker.com/r/psychemedia/openrefine/).
### versions
cf. [OpenRefine Releases](https://github.com/OpenRefine/OpenRefine/releases)
OpenRefine 2.6 Release Candidate 2 (2015-10-14) from java:8-jre-alpine **[2.6rc2]**
> docker pull felixlohmeier/openrefine:2.6rc2
OpenRefine 2.6 Release Candidate 1 (2015-04-30) from java:8-jre-alpine **[2.6rc1]**
> docker pull felixlohmeier/openrefine:2.6rc1
OpenRefine Development Version (automated build) from ubuntu:trusty + jdk **[latest]**
> docker pull felixlohmeier/openrefine
### usage
> docker run -p 80:3333 felixlohmeier/openrefine:2.6rc2
point your browser on host machine to http://localhost or point browser on any machine within your network to http://<ip address of host machine>
### example for customized run command
```docker run --rm -p 80:3333 -v /home/felix/refine:/data:z felixlohmeier/openrefine -i 0.0.0.0 -m 4G -d /data```
* automatically remove docker container when it exits
* publish internal port 3333 to host port 80
* mount host directory /home/felix/refine as working directory
* make openrefine available in the network
* increase java heap size to 4 GB
* set refine workspace to /data
* set refine workspace to /data
### batch processing with python client
see https://hub.docker.com/r/felixlohmeier/openrefine-client/

31
client-py/Dockerfile Normal file
View File

@ -0,0 +1,31 @@
FROM alpine:latest
MAINTAINER felixlohmeier <felixlohmeier@opencultureconsulting.de>
# Client for batch processing with OpenRefine: https://github.com/PaulMakepeace/refine-client-py/
# expects an OpenRefine container running with --name=refine-server
# Install python, pip, wget, unzip and bash
RUN apk add --no-cache \
bash \
python \
py-pip \
wget \
unzip
# Install dependency urllib2_file
RUN pip install urllib2_file==0.2.1
# Download and build refine-client-py
WORKDIR /app
RUN wget --no-check-certificate https://github.com/PaulMakepeace/refine-client-py/archive/master.zip
RUN unzip master.zip && rm master.zip
RUN python refine-client-py-master/setup.py build
RUN python refine-client-py-master/setup.py install
# Change docker WORKDIR (shall be mounted)
WORKDIR /data
# Execute refine.py with option host = refine-server
ENTRYPOINT ["/app/refine-client-py-master/refine.py", "-H", "refine-server"]
# Default command: list projects
CMD ["-l"]