diff --git a/Dockerfile b/Dockerfile index a16e968..48f048f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,17 @@ FROM java:7-jre-alpine -MAINTAINER Alex Tucker +MAINTAINER Alex Tucker 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 -ADD d2rq-${D2R_VERSION}.tar.gz /usr/local/ +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} -RUN mkdir /var/lib/d2rq VOLUME /var/lib/d2rq EXPOSE ${D2R_PORT} CMD ./d2r-server -b "${D2R_BASEURI}" --port ${D2R_PORT} /var/lib/d2rq/${D2R_MAPPING} diff --git a/README.md b/README.md index 6e813fc..13804c7 100644 --- a/README.md +++ b/README.md @@ -27,7 +27,7 @@ The image can be built directly and comes with database drivers for MySQL and Postgres. -`docker build -t res:d2rq .` +`docker build -t your_repo:d2rq .` For more complex scenarios, the image can be used as a base image, e.g. using the common Docker wait-for-it.sh script to allow waiting @@ -35,7 +35,7 @@ driver: ``` -FROM res:d2rq +FROM your_repo:d2rq COPY wait-for-it.sh ./ COPY mariadb-java-client-1.4.5.jar lib/db-drivers/ @@ -52,7 +52,7 @@ An initial configuration file can be generated directly by introspecting the relations in an existing SQL database: -`docker run -it res:d2rq ./generate-mapping` +`docker run -it your_repo:d2rq ./generate-mapping` Typically, the generated mapping file is then hand edited to make the transformation more naturally reflect RDF and LOD conventions. The @@ -63,9 +63,9 @@ ------- The image can be used stand-alone with the mapping file in -`config/mapping.ttl` as follows. The default +`config/mapping.ttl` as follows. The default -`docker run -p 2020:2020 -v $PWD/config:/var/lib/d2rq -p 2020:2020 -t res:d2rq` +`docker run -p 2020:2020 -v $PWD/config:/var/lib/d2rq -p 2020:2020 -t your_rep:d2rq` Environment Variables --------------------- @@ -75,8 +75,24 @@ http://localhost:2020/, but for example using docker-machine on OSX, one could run the container as: -`docker run -v $PWD/config:/var/lib/d2rq --env D2R_BASEURI=http://$(docker-machine ip default)/ -p 80:2020 -t res:d2rq +`docker run -v $PWD/config:/var/lib/d2rq --env D2R_BASEURI=http://$(docker-machine ip default)/ -p 80:2020 -t your_rep:d2rq This would tell D2R Server that its resources are published at the IP address of the local default docker machine VM on default HTTP port 80, forwarding to D2R Server running on port 2020 in the container. + +------------------------------------------------------------------------------- + +Copyright 2017 Alex Tucker + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. diff --git a/d2rq-0.8.1.tar.gz b/d2rq-0.8.1.tar.gz deleted file mode 100644 index c335309..0000000 --- a/d2rq-0.8.1.tar.gz +++ /dev/null Binary files differ