You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by GitBox <gi...@apache.org> on 2020/08/25 13:00:50 UTC

[GitHub] [jena] afs opened a new pull request #786: JENA-1949: Docker tools for Fuseki

afs opened a new pull request #786:
URL: https://github.com/apache/jena/pull/786


   This creates a zip that would be part of a Jena release.
   
   The zip file has the Dockerfile/docker-compose.yml and documentation to build locally.
   
   The container is based on alpine.
   The build creates a trimmed down Java11 runtime.
   
   The Fuseki container is about 82 Mb.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] namedgraph commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
namedgraph commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r484105962



##########
File path: jena-fuseki2/jena-fuseki-docker/README.md
##########
@@ -0,0 +1,96 @@
+# Apache Jena Fuseki Docker Tools
+
+This package contains a Dockerfile, docker-compose file, and helper scripts to
+create a docker container for Apache Jena Fuseki.
+
+The docker container is based on 
+[Fuseki main](https://jena.apache.org/documentation/fuseki2/fuseki-main)
+for running a SPARQL server.
+
+There is no UI - all configuration is by command line and all usage by via the
+network protocols.
+
+Databases can be mounted outside the docker container so they are preserved when
+the container terminates.
+
+This build system allows the user to customize the docker image.
+
+The docker build downloads the server binary from 
+[Maven central](https://repo1.maven.org/maven2/org/apache/jena/jena-fuseki-server/),
+checking the download against the SHA1 checksum.
+
+## Database
+
+There is a volume mapping "./databases" in the current diectory into the server.
+This can be used to contain databases outside, but accessible to, the container
+that do not get deleted when the container exits.
+
+See examples below.
+
+## Build
+
+Choose the version number of Apache Jena release you wish to use. This toolkit
+defaults to the version of the overall Jena release it was part of. It is best
+to use the release of this set of tools from the same release of the desired
+server.
+
+    docker-compose build --build-arg JENA_VERSION=3.16.0
+
+Note the build command must provide the version number.
+
+## Run
+
+Examples:
+
+Start Fuseki with an in-memory, updatable dataset at http://<i>host</i>:3030/ds
+
+    docker-compose run --rm --service-ports fuseki --mem /ds
+
+Load a TDB2 database, and expose, read-only, via docker:
+
+    mkdir -p databases/DB2
+    tdb2.tdbloader --loc databases/DB2 MyData.ttl
+    # Publish read-only
+    docker-compose run --rm --name MyServer --service-ports fuseki --tdb2 --loc databases/DB2 /ds

Review comment:
       I think the `up` version would be as simple as copying the same arguments into `command` in `docker-compose.yml`:
   
       fuseki:
           command: [ "--rm", "--name", "MyServer", "--service-ports", "fuseki", "--tdb2", "--loc", "databases/DB2", "/ds" ]
   
   https://docs.docker.com/compose/compose-file/compose-file-v2/#command
   
   I'm using `up` all the time because I just want to launch all the (say 4-5) interdependent services that comprise the project, at the same time. And I definitely prefer having the arguments in a config file (`docker-compose.yml`) rather than typing or pasting them into the shell, as one would have to using `run`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] kinow commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
kinow commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r486954711



##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       Thanks for the explanation @afs ! Let's go with this approach for it works and for the checksum. We can change it later if necessary :tada: :rocket: 

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       Thanks for the explanation @afs ! Let's go with this approach for it works and for the checksum. We can change it later if necessary :tada: :rocket: 

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       Thanks for the explanation @afs ! Let's go with this approach for it works and for the checksum. We can change it later if necessary :tada: :rocket: 

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       Thanks for the explanation @afs ! Let's go with this approach for it works and for the checksum. We can change it later if necessary :tada: :rocket: 

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       Thanks for the explanation @afs ! Let's go with this approach for it works and for the checksum. We can change it later if necessary :tada: :rocket: 

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       Thanks for the explanation @afs ! Let's go with this approach for it works and for the checksum. We can change it later if necessary :tada: :rocket: 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] namedgraph commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
namedgraph commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r482490333



##########
File path: jena-fuseki2/jena-fuseki-docker/README.md
##########
@@ -0,0 +1,96 @@
+# Apache Jena Fuseki Docker Tools
+
+This package contains a Dockerfile, docker-compose file, and helper scripts to
+create a docker container for Apache Jena Fuseki.
+
+The docker container is based on 
+[Fuseki main](https://jena.apache.org/documentation/fuseki2/fuseki-main)
+for running a SPARQL server.
+
+There is no UI - all configuration is by command line and all usage by via the
+network protocols.
+
+Databases can be mounted outside the docker container so they are preserved when
+the container terminates.
+
+This build system allows the user to customize the docker image.
+
+The docker build downloads the server binary from 
+[Maven central](https://repo1.maven.org/maven2/org/apache/jena/jena-fuseki-server/),
+checking the download against the SHA1 checksum.
+
+## Database
+
+There is a volume mapping "./databases" in the current diectory into the server.
+This can be used to contain databases outside, but accessible to, the container
+that do not get deleted when the container exits.
+
+See examples below.
+
+## Build
+
+Choose the version number of Apache Jena release you wish to use. This toolkit
+defaults to the version of the overall Jena release it was part of. It is best
+to use the release of this set of tools from the same release of the desired
+server.
+
+    docker-compose build --build-arg JENA_VERSION=3.16.0
+
+Note the build command must provide the version number.
+
+## Run
+
+Examples:
+
+Start Fuseki with an in-memory, updatable dataset at http://<i>host</i>:3030/ds
+
+    docker-compose run --rm --service-ports fuseki --mem /ds
+
+Load a TDB2 database, and expose, read-only, via docker:
+
+    mkdir -p databases/DB2
+    tdb2.tdbloader --loc databases/DB2 MyData.ttl
+    # Publish read-only
+    docker-compose run --rm --name MyServer --service-ports fuseki --tdb2 --loc databases/DB2 /ds
+
+To allow update on the database, updates are persisted:
+
+    docker-compose run --rm --name MyServer --service-ports fuseki --tdb2 --update --loc databases/DB2 /ds
+

Review comment:
       Missing a section `## Configuration` linking to https://jena.apache.org/documentation/fuseki2/fuseki-configuration.html as well a `docker-compose.yml` example mounting the config file and changing the command to smth like `command: [ "--config", "/var/fuseki/config.ttl" ]`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] namedgraph removed a comment on pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
namedgraph removed a comment on pull request #786:
URL: https://github.com/apache/jena/pull/786#issuecomment-685998155


   Why `docker-compose run` and not `docker-compose up`?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] kinow commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
kinow commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r486954711



##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       Thanks for the explanation @afs ! Let's go with this approach for it works and for the checksum. We can change it later if necessary :tada: :rocket: 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] rvesse commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
rvesse commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r484284528



##########
File path: jena-fuseki2/jena-fuseki-docker/download.sh
##########
@@ -0,0 +1,148 @@
+#!/bin/sh
+
+## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+ 
+# This is ash/dash script (it uses "local"), not a bash script.

Review comment:
       Missing space?
   
   `ash/dash script`  -> `a sh/dash script`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
afs commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r484433650



##########
File path: jena-fuseki2/jena-fuseki-docker/download.sh
##########
@@ -0,0 +1,148 @@
+#!/bin/sh
+
+## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+ 
+# This is ash/dash script (it uses "local"), not a bash script.

Review comment:
       `ash` is the shell on Alpine. https://stackoverflow.com/questions/35689628/starting-a-shell-in-the-docker-alpine-container




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] namedgraph commented on pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
namedgraph commented on pull request #786:
URL: https://github.com/apache/jena/pull/786#issuecomment-685998155


   Why `docker-compose run` and not `docker-compose up`?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] namedgraph commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
namedgraph commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r482475283



##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,112 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=unset
+
+# Internal, passed between stages.
+ARG JAVA_MINIMAL=/opt/java-minimal
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+ARG JENA_VERSION
+ARG JAVA_MINIMAL
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "unset" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"
+
+## -- Alternative to download : copy already downloaded.
+## COPY ${FUSEKI_JAR} .
+
+## -- Make reduced Java JDK
+RUN \
+  JDEPS="$(jdeps --multi-release base --print-module-deps --ignore-missing-deps ${FUSEKI_JAR})" && \

Review comment:
       What is this doing?

##########
File path: jena-fuseki2/jena-fuseki-docker/dist/LICENSE
##########
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]

Review comment:
       Needs to be filled out?

##########
File path: jena-fuseki2/jena-fuseki-docker/docker-compose.yaml
##########
@@ -0,0 +1,30 @@
+## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+version: '3.0'
+services:
+  fuseki:
+    build:
+      context: .
+      dockerfile: Dockerfile
+    image: fuseki
+    ports:
+      - "3030:3030"
+    volumes:
+      - ./logs:/fuseki/logs
+      - ./databases:/fuseki/databases
+#volumes:

Review comment:
       Remove?

##########
File path: jena-fuseki2/jena-fuseki-docker/entrypoint.sh
##########
@@ -0,0 +1,5 @@
+#!/bin/sh
+## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
+## env | sort
+exec "$JAVA_HOME/bin/java" $JAVA_OPTIONS -jar ${FUSEKI_DIR}/${FUSEKI_JAR} "$@"

Review comment:
       Maybe ` ${FUSEKI_DIR}/${FUSEKI_JAR}` should be `"${FUSEKI_DIR}/${FUSEKI_JAR}"`? What if there are spaces in the filepaths?

##########
File path: jena-fuseki2/jena-fuseki-docker/README.md
##########
@@ -0,0 +1,96 @@
+# Apache Jena Fuseki Docker Tools
+
+This package contains a Dockerfile, docker-compose file, and helper scripts to
+create a docker container for Apache Jena Fuseki.
+
+The docker container is based on 
+[Fuseki main](https://jena.apache.org/documentation/fuseki2/fuseki-main)
+for running a SPARQL server.
+
+There is no UI - all configuration is by command line and all usage by via the
+network protocols.
+
+Databases can be mounted outside the docker container so they are preserved when
+the container terminates.
+
+This build system allows the user to customize the docker image.
+
+The docker build downloads the server binary from 
+[Maven central](https://repo1.maven.org/maven2/org/apache/jena/jena-fuseki-server/),
+checking the download against the SHA1 checksum.
+
+## Database
+
+There is a volume mapping "./databases" in the current diectory into the server.

Review comment:
       `diectory` => `directory`

##########
File path: jena-fuseki2/jena-fuseki-docker/docker-compose.yaml
##########
@@ -0,0 +1,30 @@
+## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+version: '3.0'

Review comment:
       Maybe 2.x would suffice?

##########
File path: jena-fuseki2/jena-fuseki-docker/download.sh
##########
@@ -0,0 +1,148 @@
+#!/bin/sh
+
+## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+ 
+# This is ash/dash script (it uses "local"), not a bash script.
+# It can run in an Alpine image.
+
+# The advantage over using docker ADD is that it checks
+# whether download file is already present and does not download
+# each time.
+
+# Shell script to down load URL and check the checksum
+
+USAGE="Usage: $(basename "$0") --chksum [sha1|sha512] URL"
+
+if [ $# -eq 0 ]
+then
+    echo "$USAGE" 2>&1
+    exit 1
+fi
+
+CHKSUM_TYPE='unset'
+
+while [ $# -gt 0 ] ; do
+    case "$1" in
+	--chksum|-chksum|-sha|--sha)
+	    if [ $# -lt 2 ]
+	    then
+		echo "$USAGE" 1>&2
+		exit 1
+	    fi
+	    CHKSUM_TYPE=$2
+	    shift
+	    shift
+	    ;;
+	-h|--help)
+	    echo "$USAGE" 1>&2
+	    exit 0
+	    ;;
+	-*)
+	    echo "$USAGE" 1>&2
+	    exit 1
+	    ;;
+	*)
+	    if [ $# -ne 1 ]
+	    then
+		echo "$USAGE" 1>&2
+		exit 1
+	    fi
+	    URL="$1"
+	    shift
+	    ;;
+    esac
+done
+
+case "${CHKSUM_TYPE}" in
+    unset)
+	echo "$USAGE" 1>&2
+	exit 1
+	;;
+    sha*|md5) ;;
+    *)
+	echo "Bad checksum type: '$CHKSUM_TYPE' (must start 'sha' or be 'md5')" 2>&1
+	exit 1	 
+	;;
+esac
+
+## ---- Script starts ----
+
+ARTIFACT_URL="${URL}"
+ARTIFACT_NAME="$(basename "$ARTIFACT_URL")"
+
+# -------- Checksum details
+
+CHKSUM_EXT=".${CHKSUM_TYPE}"
+CHKSUM_URL="${ARTIFACT_URL}${CHKSUM_EXT}"
+CHKSUM_FILE="${ARTIFACT_NAME}${CHKSUM_EXT}"
+CHKSUMPROG="${CHKSUM_TYPE}sum"
+# --------
+
+CURL_FETCH_OPTS="-sS --fail --location --max-redirs 3"
+if false
+then
+    echo "ARTIFACT_URL=$ARTIFACT_URL"
+    echo "CHKSUM_URL=$CHKSUM_URL"
+fi
+
+download() { # URL
+    local URL="$1"
+    local FN="$(basename "$URL")"
+    if [ ! -e "$FN" ]
+    then
+	echo "Fetching $URL"
+	curl $CURL_FETCH_OPTS "$URL" --output "$FN" \
+	    || { echo "Bad download of $FN" 2>&1 ; return 1 ; }
+    else
+	echo "$FN already present"
+    fi
+    return 0
+}
+
+checkChksum() { # Filename checksum
+    local FN="$1"
+    local CHKSUM="$2"
+    if [ ! -e "$FN" ]
+    then
+	echo "No such file: '$FN'" 2>&1
+	exit 1
+    fi
+    # NB Two spaces required for busybox
+    echo "$CHKSUM  $FN" | ${CHKSUMPROG} -c > /dev/null
+}
+
+download "$ARTIFACT_URL" || exit 1
+
+if [ -z "$CHKSUM" ]
+then
+    # Checksum not previously set.
+    # Extract from file, copes with variations in content (filename or not)
+    download "$CHKSUM_URL" || exit 1
+    CHKSUM="$(cut -d' ' -f1 "$CHKSUM_FILE")"
+fi
+
+checkChksum "${ARTIFACT_NAME}" "$CHKSUM"
+if [ $? = 0 ]
+then
+    echo "Good download: $ARTIFACT_NAME"
+else
+    echo "BAD!!!! $ARTIFACT_NAME"

Review comment:
       Maybe more informative message? :)

##########
File path: jena-fuseki2/jena-fuseki-docker/README.md
##########
@@ -0,0 +1,96 @@
+# Apache Jena Fuseki Docker Tools
+
+This package contains a Dockerfile, docker-compose file, and helper scripts to
+create a docker container for Apache Jena Fuseki.
+
+The docker container is based on 
+[Fuseki main](https://jena.apache.org/documentation/fuseki2/fuseki-main)
+for running a SPARQL server.
+
+There is no UI - all configuration is by command line and all usage by via the
+network protocols.
+
+Databases can be mounted outside the docker container so they are preserved when
+the container terminates.
+
+This build system allows the user to customize the docker image.
+
+The docker build downloads the server binary from 
+[Maven central](https://repo1.maven.org/maven2/org/apache/jena/jena-fuseki-server/),
+checking the download against the SHA1 checksum.
+
+## Database
+
+There is a volume mapping "./databases" in the current diectory into the server.
+This can be used to contain databases outside, but accessible to, the container
+that do not get deleted when the container exits.
+
+See examples below.
+
+## Build
+
+Choose the version number of Apache Jena release you wish to use. This toolkit
+defaults to the version of the overall Jena release it was part of. It is best
+to use the release of this set of tools from the same release of the desired
+server.
+
+    docker-compose build --build-arg JENA_VERSION=3.16.0
+
+Note the build command must provide the version number.
+
+## Run
+
+Examples:
+
+Start Fuseki with an in-memory, updatable dataset at http://<i>host</i>:3030/ds
+
+    docker-compose run --rm --service-ports fuseki --mem /ds
+
+Load a TDB2 database, and expose, read-only, via docker:
+
+    mkdir -p databases/DB2
+    tdb2.tdbloader --loc databases/DB2 MyData.ttl
+    # Publish read-only
+    docker-compose run --rm --name MyServer --service-ports fuseki --tdb2 --loc databases/DB2 /ds
+
+To allow update on the database, updates are persisted:
+
+    docker-compose run --rm --name MyServer --service-ports fuseki --tdb2 --update --loc databases/DB2 /ds
+

Review comment:
       Missing a section `## Configuration` linking to https://jena.apache.org/documentation/fuseki2/fuseki-configuration.html as well a `docker-compose.yml` example mounting the config file and changing the command to smth like `command: [ "--config", "/var/fuseki/config.ttl" ]`. But not that you have an entrypoint script, maybe it's become more complicated to pass the config?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] kinow commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
kinow commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r486661752



##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       Although I think docker doesn't provide checksum verification, so it would justify having the shell script. 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] kinow commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
kinow commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r486652163



##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       @afs this was the only part I didn't understand :nerd_face: 
   
   `ADD "$JAR_URL"` would download the JAR once, when we run `docker build ...` no? Why is the `download.sh` necessary?
   
   I saw the comment in that file about running only once, but I thought `ADD $remote-url` was also executed once, when building the container from the image?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
afs commented on pull request #786:
URL: https://github.com/apache/jena/pull/786#issuecomment-690961262


   That is explained in the description on the JIRA ticket.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
afs commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r486865994



##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e..g file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e.g. file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I have had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e..g file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e.g. file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I have had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e..g file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e.g. file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I have had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e..g file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e.g. file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I have had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e..g file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e.g. file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I have had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e..g file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e.g. file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I have had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e..g file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e.g. file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I have had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] namedgraph commented on pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
namedgraph commented on pull request #786:
URL: https://github.com/apache/jena/pull/786#issuecomment-690940448






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] namedgraph commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
namedgraph commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r482490333



##########
File path: jena-fuseki2/jena-fuseki-docker/README.md
##########
@@ -0,0 +1,96 @@
+# Apache Jena Fuseki Docker Tools
+
+This package contains a Dockerfile, docker-compose file, and helper scripts to
+create a docker container for Apache Jena Fuseki.
+
+The docker container is based on 
+[Fuseki main](https://jena.apache.org/documentation/fuseki2/fuseki-main)
+for running a SPARQL server.
+
+There is no UI - all configuration is by command line and all usage by via the
+network protocols.
+
+Databases can be mounted outside the docker container so they are preserved when
+the container terminates.
+
+This build system allows the user to customize the docker image.
+
+The docker build downloads the server binary from 
+[Maven central](https://repo1.maven.org/maven2/org/apache/jena/jena-fuseki-server/),
+checking the download against the SHA1 checksum.
+
+## Database
+
+There is a volume mapping "./databases" in the current diectory into the server.
+This can be used to contain databases outside, but accessible to, the container
+that do not get deleted when the container exits.
+
+See examples below.
+
+## Build
+
+Choose the version number of Apache Jena release you wish to use. This toolkit
+defaults to the version of the overall Jena release it was part of. It is best
+to use the release of this set of tools from the same release of the desired
+server.
+
+    docker-compose build --build-arg JENA_VERSION=3.16.0
+
+Note the build command must provide the version number.
+
+## Run
+
+Examples:
+
+Start Fuseki with an in-memory, updatable dataset at http://<i>host</i>:3030/ds
+
+    docker-compose run --rm --service-ports fuseki --mem /ds
+
+Load a TDB2 database, and expose, read-only, via docker:
+
+    mkdir -p databases/DB2
+    tdb2.tdbloader --loc databases/DB2 MyData.ttl
+    # Publish read-only
+    docker-compose run --rm --name MyServer --service-ports fuseki --tdb2 --loc databases/DB2 /ds
+
+To allow update on the database, updates are persisted:
+
+    docker-compose run --rm --name MyServer --service-ports fuseki --tdb2 --update --loc databases/DB2 /ds
+

Review comment:
       Missing a section `## Configuration` linking to https://jena.apache.org/documentation/fuseki2/fuseki-configuration.html as well a `docker-compose.yml` example mounting the config file and changing the command to smth like `command: [ "--config", "/fuseki/config.ttl" ]`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] kinow commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
kinow commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r486954711



##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       Thanks for the explanation @afs ! Let's go with this approach for it works and for the checksum. We can change it later if necessary :tada: :rocket: 

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       Thanks for the explanation @afs ! Let's go with this approach for it works and for the checksum. We can change it later if necessary :tada: :rocket: 

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       Thanks for the explanation @afs ! Let's go with this approach for it works and for the checksum. We can change it later if necessary :tada: :rocket: 




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
afs commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r483717819



##########
File path: jena-fuseki2/jena-fuseki-docker/dist/LICENSE
##########
@@ -0,0 +1,202 @@
+
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]

Review comment:
       See a few lines above "APPENDIX: How to apply the Apache License to your work." It's the standard explanation for anyone who takes the text on how to use the license.

##########
File path: jena-fuseki2/jena-fuseki-docker/README.md
##########
@@ -0,0 +1,96 @@
+# Apache Jena Fuseki Docker Tools
+
+This package contains a Dockerfile, docker-compose file, and helper scripts to
+create a docker container for Apache Jena Fuseki.
+
+The docker container is based on 
+[Fuseki main](https://jena.apache.org/documentation/fuseki2/fuseki-main)
+for running a SPARQL server.
+
+There is no UI - all configuration is by command line and all usage by via the
+network protocols.
+
+Databases can be mounted outside the docker container so they are preserved when
+the container terminates.
+
+This build system allows the user to customize the docker image.
+
+The docker build downloads the server binary from 
+[Maven central](https://repo1.maven.org/maven2/org/apache/jena/jena-fuseki-server/),
+checking the download against the SHA1 checksum.
+
+## Database
+
+There is a volume mapping "./databases" in the current diectory into the server.

Review comment:
       Done

##########
File path: jena-fuseki2/jena-fuseki-docker/entrypoint.sh
##########
@@ -0,0 +1,5 @@
+#!/bin/sh
+## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+
+## env | sort
+exec "$JAVA_HOME/bin/java" $JAVA_OPTIONS -jar ${FUSEKI_DIR}/${FUSEKI_JAR} "$@"

Review comment:
       Done

##########
File path: jena-fuseki2/jena-fuseki-docker/README.md
##########
@@ -0,0 +1,96 @@
+# Apache Jena Fuseki Docker Tools
+
+This package contains a Dockerfile, docker-compose file, and helper scripts to
+create a docker container for Apache Jena Fuseki.
+
+The docker container is based on 
+[Fuseki main](https://jena.apache.org/documentation/fuseki2/fuseki-main)
+for running a SPARQL server.
+
+There is no UI - all configuration is by command line and all usage by via the
+network protocols.
+
+Databases can be mounted outside the docker container so they are preserved when
+the container terminates.
+
+This build system allows the user to customize the docker image.
+
+The docker build downloads the server binary from 
+[Maven central](https://repo1.maven.org/maven2/org/apache/jena/jena-fuseki-server/),
+checking the download against the SHA1 checksum.
+
+## Database
+
+There is a volume mapping "./databases" in the current diectory into the server.
+This can be used to contain databases outside, but accessible to, the container
+that do not get deleted when the container exits.
+
+See examples below.
+
+## Build
+
+Choose the version number of Apache Jena release you wish to use. This toolkit
+defaults to the version of the overall Jena release it was part of. It is best
+to use the release of this set of tools from the same release of the desired
+server.
+
+    docker-compose build --build-arg JENA_VERSION=3.16.0
+
+Note the build command must provide the version number.
+
+## Run
+
+Examples:
+
+Start Fuseki with an in-memory, updatable dataset at http://<i>host</i>:3030/ds
+
+    docker-compose run --rm --service-ports fuseki --mem /ds
+
+Load a TDB2 database, and expose, read-only, via docker:
+
+    mkdir -p databases/DB2
+    tdb2.tdbloader --loc databases/DB2 MyData.ttl
+    # Publish read-only
+    docker-compose run --rm --name MyServer --service-ports fuseki --tdb2 --loc databases/DB2 /ds
+
+To allow update on the database, updates are persisted:
+
+    docker-compose run --rm --name MyServer --service-ports fuseki --tdb2 --update --loc databases/DB2 /ds
+

Review comment:
       Link to documentation added.
   
   As for a docker-compose example, that is better done as fuller documentation, maybe on the website, later. This is not a tutorial in using docker-compose - that's too ambitious.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
afs commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r483717643



##########
File path: jena-fuseki2/jena-fuseki-docker/README.md
##########
@@ -0,0 +1,96 @@
+# Apache Jena Fuseki Docker Tools
+
+This package contains a Dockerfile, docker-compose file, and helper scripts to
+create a docker container for Apache Jena Fuseki.
+
+The docker container is based on 
+[Fuseki main](https://jena.apache.org/documentation/fuseki2/fuseki-main)
+for running a SPARQL server.
+
+There is no UI - all configuration is by command line and all usage by via the
+network protocols.
+
+Databases can be mounted outside the docker container so they are preserved when
+the container terminates.
+
+This build system allows the user to customize the docker image.
+
+The docker build downloads the server binary from 
+[Maven central](https://repo1.maven.org/maven2/org/apache/jena/jena-fuseki-server/),
+checking the download against the SHA1 checksum.
+
+## Database
+
+There is a volume mapping "./databases" in the current diectory into the server.
+This can be used to contain databases outside, but accessible to, the container
+that do not get deleted when the container exits.
+
+See examples below.
+
+## Build
+
+Choose the version number of Apache Jena release you wish to use. This toolkit
+defaults to the version of the overall Jena release it was part of. It is best
+to use the release of this set of tools from the same release of the desired
+server.
+
+    docker-compose build --build-arg JENA_VERSION=3.16.0
+
+Note the build command must provide the version number.
+
+## Run
+
+Examples:
+
+Start Fuseki with an in-memory, updatable dataset at http://<i>host</i>:3030/ds
+
+    docker-compose run --rm --service-ports fuseki --mem /ds
+
+Load a TDB2 database, and expose, read-only, via docker:
+
+    mkdir -p databases/DB2
+    tdb2.tdbloader --loc databases/DB2 MyData.ttl
+    # Publish read-only
+    docker-compose run --rm --name MyServer --service-ports fuseki --tdb2 --loc databases/DB2 /ds

Review comment:
       To pass in arguments without modifying the `docker-compose.yaml` and also in the same style as running Fuseki not in docker.

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,112 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=unset
+
+# Internal, passed between stages.
+ARG JAVA_MINIMAL=/opt/java-minimal
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+ARG JENA_VERSION
+ARG JAVA_MINIMAL
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "unset" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"
+
+## -- Alternative to download : copy already downloaded.
+## COPY ${FUSEKI_JAR} .
+
+## -- Make reduced Java JDK
+RUN \
+  JDEPS="$(jdeps --multi-release base --print-module-deps --ignore-missing-deps ${FUSEKI_JAR})" && \

Review comment:
       Input for jlink.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs merged pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
afs merged pull request #786:
URL: https://github.com/apache/jena/pull/786


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
afs commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r484434707



##########
File path: jena-fuseki2/jena-fuseki-docker/download.sh
##########
@@ -0,0 +1,148 @@
+#!/bin/sh
+
+## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+ 
+# This is ash/dash script (it uses "local"), not a bash script.
+# It can run in an Alpine image.
+
+# The advantage over using docker ADD is that it checks
+# whether download file is already present and does not download
+# each time.
+
+# Shell script to down load URL and check the checksum

Review comment:
       Done




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs merged pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
afs merged pull request #786:
URL: https://github.com/apache/jena/pull/786






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] namedgraph commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
namedgraph commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r482473252



##########
File path: jena-fuseki2/jena-fuseki-docker/README.md
##########
@@ -0,0 +1,96 @@
+# Apache Jena Fuseki Docker Tools
+
+This package contains a Dockerfile, docker-compose file, and helper scripts to
+create a docker container for Apache Jena Fuseki.
+
+The docker container is based on 
+[Fuseki main](https://jena.apache.org/documentation/fuseki2/fuseki-main)
+for running a SPARQL server.
+
+There is no UI - all configuration is by command line and all usage by via the
+network protocols.
+
+Databases can be mounted outside the docker container so they are preserved when
+the container terminates.
+
+This build system allows the user to customize the docker image.
+
+The docker build downloads the server binary from 
+[Maven central](https://repo1.maven.org/maven2/org/apache/jena/jena-fuseki-server/),
+checking the download against the SHA1 checksum.
+
+## Database
+
+There is a volume mapping "./databases" in the current diectory into the server.
+This can be used to contain databases outside, but accessible to, the container
+that do not get deleted when the container exits.
+
+See examples below.
+
+## Build
+
+Choose the version number of Apache Jena release you wish to use. This toolkit
+defaults to the version of the overall Jena release it was part of. It is best
+to use the release of this set of tools from the same release of the desired
+server.
+
+    docker-compose build --build-arg JENA_VERSION=3.16.0
+
+Note the build command must provide the version number.
+
+## Run
+
+Examples:
+
+Start Fuseki with an in-memory, updatable dataset at http://<i>host</i>:3030/ds
+
+    docker-compose run --rm --service-ports fuseki --mem /ds
+
+Load a TDB2 database, and expose, read-only, via docker:
+
+    mkdir -p databases/DB2
+    tdb2.tdbloader --loc databases/DB2 MyData.ttl
+    # Publish read-only
+    docker-compose run --rm --name MyServer --service-ports fuseki --tdb2 --loc databases/DB2 /ds

Review comment:
       Why not `docker-compose up`?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
afs commented on pull request #786:
URL: https://github.com/apache/jena/pull/786#issuecomment-690961262






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
afs commented on pull request #786:
URL: https://github.com/apache/jena/pull/786#issuecomment-690337513


   Enough to make it worth getting into the codebase.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] namedgraph commented on pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
namedgraph commented on pull request #786:
URL: https://github.com/apache/jena/pull/786#issuecomment-690940448






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
afs commented on pull request #786:
URL: https://github.com/apache/jena/pull/786#issuecomment-691159630


   Final cleanup before merging. 
   
   Comments for download.sh and in Dockerfile.
   Fix in README for "docker build".
   Split curl arguments for clarity.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] rvesse commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
rvesse commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r484284716



##########
File path: jena-fuseki2/jena-fuseki-docker/download.sh
##########
@@ -0,0 +1,148 @@
+#!/bin/sh
+
+## Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you 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.
+
+ 
+# This is ash/dash script (it uses "local"), not a bash script.
+# It can run in an Alpine image.
+
+# The advantage over using docker ADD is that it checks
+# whether download file is already present and does not download
+# each time.
+
+# Shell script to down load URL and check the checksum

Review comment:
       Unnecessary space - `down load`




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] namedgraph commented on pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
namedgraph commented on pull request #786:
URL: https://github.com/apache/jena/pull/786#issuecomment-690940448


   @afs so what about Docker Hub? Is the plan to get the images to build automatically?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
afs commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r486865994



##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e.g. file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I have had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
afs commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r486865994



##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e..g file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e.g. file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I have had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e..g file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   

##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e.g. file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I have had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] namedgraph commented on pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
namedgraph commented on pull request #786:
URL: https://github.com/apache/jena/pull/786#issuecomment-686042608


   And what's the plan with Docker Hub?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs merged pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
afs merged pull request #786:
URL: https://github.com/apache/jena/pull/786






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
afs commented on pull request #786:
URL: https://github.com/apache/jena/pull/786#issuecomment-690961262






----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
afs commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r483795319



##########
File path: jena-fuseki2/jena-fuseki-docker/README.md
##########
@@ -0,0 +1,96 @@
+# Apache Jena Fuseki Docker Tools
+
+This package contains a Dockerfile, docker-compose file, and helper scripts to
+create a docker container for Apache Jena Fuseki.
+
+The docker container is based on 
+[Fuseki main](https://jena.apache.org/documentation/fuseki2/fuseki-main)
+for running a SPARQL server.
+
+There is no UI - all configuration is by command line and all usage by via the
+network protocols.
+
+Databases can be mounted outside the docker container so they are preserved when
+the container terminates.
+
+This build system allows the user to customize the docker image.
+
+The docker build downloads the server binary from 
+[Maven central](https://repo1.maven.org/maven2/org/apache/jena/jena-fuseki-server/),
+checking the download against the SHA1 checksum.
+
+## Database
+
+There is a volume mapping "./databases" in the current diectory into the server.
+This can be used to contain databases outside, but accessible to, the container
+that do not get deleted when the container exits.
+
+See examples below.
+
+## Build
+
+Choose the version number of Apache Jena release you wish to use. This toolkit
+defaults to the version of the overall Jena release it was part of. It is best
+to use the release of this set of tools from the same release of the desired
+server.
+
+    docker-compose build --build-arg JENA_VERSION=3.16.0
+
+Note the build command must provide the version number.
+
+## Run
+
+Examples:
+
+Start Fuseki with an in-memory, updatable dataset at http://<i>host</i>:3030/ds
+
+    docker-compose run --rm --service-ports fuseki --mem /ds
+
+Load a TDB2 database, and expose, read-only, via docker:
+
+    mkdir -p databases/DB2
+    tdb2.tdbloader --loc databases/DB2 MyData.ttl
+    # Publish read-only
+    docker-compose run --rm --name MyServer --service-ports fuseki --tdb2 --loc databases/DB2 /ds

Review comment:
       You can't pass arguments to a specific container with `up` except by rewriting to use environment variables, at least as far as I know. The simple way to use the container is to use `run` with the standard Fuseki argument line.
   
   If you wish to contribute, say, a tutorial on using docker-compose, that would be excellent.
   
   JENA-1949 focuses on having a build kit in the codebase and does not try to do everything. Teh description includes "This ticket is for the setup and scripts to build an image, not to publish it." I believe it is a step forward.
   
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] namedgraph commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
namedgraph commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r483776165



##########
File path: jena-fuseki2/jena-fuseki-docker/README.md
##########
@@ -0,0 +1,96 @@
+# Apache Jena Fuseki Docker Tools
+
+This package contains a Dockerfile, docker-compose file, and helper scripts to
+create a docker container for Apache Jena Fuseki.
+
+The docker container is based on 
+[Fuseki main](https://jena.apache.org/documentation/fuseki2/fuseki-main)
+for running a SPARQL server.
+
+There is no UI - all configuration is by command line and all usage by via the
+network protocols.
+
+Databases can be mounted outside the docker container so they are preserved when
+the container terminates.
+
+This build system allows the user to customize the docker image.
+
+The docker build downloads the server binary from 
+[Maven central](https://repo1.maven.org/maven2/org/apache/jena/jena-fuseki-server/),
+checking the download against the SHA1 checksum.
+
+## Database
+
+There is a volume mapping "./databases" in the current diectory into the server.
+This can be used to contain databases outside, but accessible to, the container
+that do not get deleted when the container exits.
+
+See examples below.
+
+## Build
+
+Choose the version number of Apache Jena release you wish to use. This toolkit
+defaults to the version of the overall Jena release it was part of. It is best
+to use the release of this set of tools from the same release of the desired
+server.
+
+    docker-compose build --build-arg JENA_VERSION=3.16.0
+
+Note the build command must provide the version number.
+
+## Run
+
+Examples:
+
+Start Fuseki with an in-memory, updatable dataset at http://<i>host</i>:3030/ds
+
+    docker-compose run --rm --service-ports fuseki --mem /ds
+
+Load a TDB2 database, and expose, read-only, via docker:
+
+    mkdir -p databases/DB2
+    tdb2.tdbloader --loc databases/DB2 MyData.ttl
+    # Publish read-only
+    docker-compose run --rm --name MyServer --service-ports fuseki --tdb2 --loc databases/DB2 /ds

Review comment:
       But the [Compose FAQ says](https://docs.docker.com/compose/faq/#whats-the-difference-between-up-run-and-start):
   >Typically, you want `docker-compose up`. Use up to start or restart all the services defined in a `docker-compose.yml`. In the default “attached” mode, you see all the logs from all the containers. In “detached” mode (`-d`), Compose exits after starting the containers, but the containers continue to run in the background.
   > The `docker-compose run` command is for running “one-off” or “adhoc” tasks. It requires the service name you want to run and only starts containers for services that the running service depends on. Use `run` to run tests or perform an administrative task such as removing or adding data to a data volume container.
   
   Sounds to me like running a database is *not* a one-off or administrative task, as you normally want to persist the data, and therefore `docker-compose up` is a better fit.
   
   Could we at least have alternative examples with `up` and `run`?




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] afs commented on a change in pull request #786: JENA-1949: Docker tools for Fuseki

Posted by GitBox <gi...@apache.org>.
afs commented on a change in pull request #786:
URL: https://github.com/apache/jena/pull/786#discussion_r486865994



##########
File path: jena-fuseki2/jena-fuseki-docker/Dockerfile
##########
@@ -0,0 +1,111 @@
+## Licensed to the Apache Software Foundation (ASF) under one or more
+## contributor license agreements.  See the NOTICE file distributed with
+## this work for additional information regarding copyright ownership.
+## The ASF licenses this file to You 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.
+
+## Apache Jena Fuseki server Dockerfile.
+
+## This Dockefile builds a reduced footprint container.
+
+ARG OPENJDK_VERSION=14
+ARG ALPINE_VERSION=3.12.0
+ARG JENA_VERSION=""
+
+# Internal, passed between stages.
+ARG FUSEKI_DIR=/fuseki
+ARG FUSEKI_JAR=jena-fuseki-server-${JENA_VERSION}.jar
+ARG JAVA_MINIMAL=/opt/java-minimal
+
+## ---- Stage: Download and build java.
+FROM openjdk:${OPENJDK_VERSION}-alpine AS base
+
+ARG JAVA_MINIMAL
+ARG JENA_VERSION
+ARG FUSEKI_DIR
+ARG FUSEKI_JAR
+ARG REPO=https://repo1.maven.org/maven2
+ARG JAR_URL=${REPO}/org/apache/jena/jena-fuseki-server/${JENA_VERSION}/${FUSEKI_JAR}
+
+RUN [ "${JENA_VERSION}" != "" ] || { echo -e '\n**** Set JENA_VERSION ****\n' ; exit 1 ; }
+RUN echo && echo "==== Docker build for Apache Jena Fuseki ${JENA_VERSION} ====" && echo
+
+# Alpine: For objcopy used in jlink
+RUN apk add --no-cache curl binutils
+
+## -- Fuseki installed and runs in /fuseki.
+WORKDIR $FUSEKI_DIR
+
+## -- Download the jar file.
+COPY download.sh .
+RUN chmod a+x download.sh
+
+RUN ./download.sh --chksum sha1 "$JAR_URL"

Review comment:
       My experience is that ADD runs each time, presumably because it does not know whether the file at the URL has changed. If it was a local filesystem file, it has more to go on, e..g file modification time, but for a URL that information isn't there.
   
   Maybe I was using it wrongly; I didn't chase it further because you are spot-on that it does not check the checksum, and with large files from maven.central I had a partial download during a docker build.
   
   At £job, we run the process from `make`.  It is the `Makefile` that downloads and caches the file then docker `COPY`s from local filesystem into the docker container build. But that assumes a `make` setup so I put it the steps in the build stage of the Dockerfile.
   
   All that said, I don't use docker that much so advice on better practice is very welcome, especially if attached to a PR!
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org