Comments (7)
Here is an example of a Dockerfile to build Java we use usually (1 stage with maven to build the jar, 1 stage with a light JRE to execute the jar : https://github.com/MaastrichtU-IDS/xml2rdf/blob/master/Dockerfile
Compiling a jar allow you to avoid any issues related to changing the path where the application is used within your container
Commands to run the test pod and connect to it (from the d2s-argo-workflow repo):
kubectl create -f tests/test-devnull-pod.yaml
kubectl exec -it test-devnull-pod -- /bin/bash
from rdfunit.
I fixed RDFUnit to be packaged as a standalone jar in the RDFUnit Docker container. So using it from any path with any workdir set will work (available at https://hub.docker.com/repository/docker/umids/rdfunit )
What has been done:
- added the shade plugin from the profile
cli-standalone
to the default build plugins in the pom.xml (using profiles was not clear) - rewriting the Dockerfile to build the standalone jar in a maven container before running it in a openjdk slim container
- use absolute path to run the jar in the Docker entrypoint
See commits:
See the new Dockerfile
It is working perfectly fine, let me know if that interest you
We could avoid to change the pom.xml by selection the cli-standalone
profile when running mvn package
, but not sure how to do it
from rdfunit.
Thanks for the report @vemonet
I agree that using a fat jar is a better option for running RDFUnit in docker
I like your change, my only concern is that by adding the shade plugin inside the default maven profile, it will be running for every maven execution and possibly delay other dev processes.
We could easily add it in a separate profile (i.e. standaloneJar
) and add -PstandaloneJar
in the docker command, wdyt?
from rdfunit.
Hi @jimkont , yes that was my thought also
I rewrote the change to edit only the Dockerfile to properly use the cli-standalone profile when running mvn package
See commit vemonet@2452b1b
And see the Dockerfile: https://github.com/vemonet/RDFUnit/blob/develop/Dockerfile
I kept /usr/src/myapp
as workdir, but we could use something shorter if you want, like /app
Additionally this also fix RDFUnit to be used in CWL workflows (CWL redefine the Docker workdir) 🙂
I did a pull request if that works for you: #99
from rdfunit.
What is the status here?
from rdfunit.
@vemonet can you check if we can close this issue? Is there anything else pending after your Merge request (#99)?
from rdfunit.
@jimkont it is working as expected now, thanks a lot!
from rdfunit.
Related Issues (20)
- AggregatedTestExecutor (and other executors) do not properly close QueryExecutionFactory instances HOT 4
- Any plans to publish version 0.8.22 in the maven repo and as Docker image? HOT 1
- Webservice does not build HOT 4
- Docker image for webservice HOT 3
- Show actual latest release on Github homepage HOT 1
- Result levels are different or not all existing comparing to the help text HOT 1
- There is a problem with maxCount ? HOT 4
- replacing values from SPARQL based constraints in the sh:message HOT 1
- Default cache ignores `-T 0` setting HOT 1
- Object in blank node of testCase is artificial for SHACL NodeShapes HOT 2
- Feature: Allow for using bearer token with secured SPARQL endpoints HOT 1
- sh:xone constraints not supported HOT 1
- sh:not constraints not supported HOT 1
- sh:qualifiedValueShape constraints not supported
- Allow relative paths in command line configuration when specifying -s
- Automatic Constraint Detection based on RDFS/OWL broken HOT 1
- ShEx support? HOT 3
- Unable to build project using docker. HOT 4
- Question: number of instances for a given class rule HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rdfunit.