Newer
Older
d2r-docker / Dockerfile
FROM java:7-jre-alpine
MAINTAINER Alex Tucker <alex@floop.org.uk>

ENV D2R_BASEURI=http://localhost:2020/
ENV D2R_PORT=2020
ENV D2R_VERSION=0.8.1
ENV D2R_MAPPING=mapping.ttl

RUN apk add --no-cache bash curl \
  && curl -o /tmp/d2rq-${D2R_VERSION}.tar.gz -L https://github.com/downloads/d2rq/d2rq/d2rq-${D2R_VERSION}.tar.gz \
  && tar -C /usr/local/ -xf /tmp/d2rq-${D2R_VERSION}.tar.gz \
  && rm /tmp/d2rq-${D2R_VERSION}.tar.gz \
  && mkdir /var/lib/d2rq
WORKDIR /usr/local/d2rq-${D2R_VERSION}
VOLUME /var/lib/d2rq
EXPOSE ${D2R_PORT}
CMD ./d2r-server -b "${D2R_BASEURI}" --port ${D2R_PORT} /var/lib/d2rq/${D2R_MAPPING}