ontotext-ad / graphdb-docker Goto Github PK
View Code? Open in Web Editor NEWDocker images for GraphDB
Docker images for GraphDB
It is usually highly recommended to provide a license with publicly published code
Should the GraphDB license agreement be added for this repo?
e.g. http://graphdb.ontotext.com/LICENSE-GraphDB-Free.txt or the Apache 2 https://github.com/Ontotext-AD/graphdb-workbench/blob/master/licenses/LICENSE
With the release of GraphDB 9, OpenJDK 11 is supported.
Java 11 has i.e. so much better memory management, and I am quite sure Open JDK 11 will be the preferred base image for the missing latest tag (ref #4 ). But for now it would be nice if Ontotext could push a OpenJDK 11 based image tag to Docker Hub.
I could prepare a PR if there is any chance of having it merged to master. I do not want to waste my time....
config.ttl
that has been generated@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix rep: <http://www.openrdf.org/config/repository#> .
@prefix sail: <http://www.openrdf.org/config/sail#> .
@prefix sail-shacl: <http://rdf4j.org/config/sail/shacl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
<#cohd> a rep:Repository;
rep:repositoryID "cohd";
rep:repositoryImpl [
rep:repositoryType "graphdb:FreeSailRepository";
<http://www.openrdf.org/config/repository/sail#sailImpl> [
sail-shacl:cacheSelectNodes true;
sail-shacl:globalLogValidationExecution false;
sail-shacl:ignoreNoShapesLoadedException false;
sail-shacl:logValidationPlans false;
sail-shacl:logValidationViolations false;
sail-shacl:parallelValidation true;
sail-shacl:performanceLogging false;
sail-shacl:rdfsSubClassReasoning true;
sail-shacl:serializableValidation true;
sail-shacl:undefinedTargetValidatesAllSubjects false;
sail-shacl:validationEnabled true;
sail:delegate [
<http://www.ontotext.com/trree/owlim#base-URL> "https://w3id.org/cohd/";
<http://www.ontotext.com/trree/owlim#check-for-inconsistencies> "false";
<http://www.ontotext.com/trree/owlim#defaultNS> "";
<http://www.ontotext.com/trree/owlim#disable-sameAs> "true";
<http://www.ontotext.com/trree/owlim#enable-context-index> "true";
<http://www.ontotext.com/trree/owlim#enable-literal-index> "true";
<http://www.ontotext.com/trree/owlim#enablePredicateList> "true";
<http://www.ontotext.com/trree/owlim#entity-id-size> "40";
<http://www.ontotext.com/trree/owlim#entity-index-size> "999999999";
<http://www.ontotext.com/trree/owlim#imports> "";
<http://www.ontotext.com/trree/owlim#in-memory-literal-properties> "true";
<http://www.ontotext.com/trree/owlim#query-limit-results> "0";
<http://www.ontotext.com/trree/owlim#query-timeout> "0";
<http://www.ontotext.com/trree/owlim#read-only> "false";
<http://www.ontotext.com/trree/owlim#repository-type> "file-repository";
<http://www.ontotext.com/trree/owlim#ruleset> "empty";
<http://www.ontotext.com/trree/owlim#storage-folder> "storage";
<http://www.ontotext.com/trree/owlim#throw-QueryEvaluationException-on-timeout> "false";
sail:sailType "graphdb:FreeSail"
];
sail:sailType "graphdb:ShaclSail"
]
];
rdfs:label "COHD" .
config.ttl
file (which should be valid since it has been generated by GraphDB itself)But I get this error:
graphdb-preload | 12:58:32.985 [main] INFO com.ontotext.config.AbstractParameter - Configured parameter 'do.resolve.entities' to default value 'true'
graphdb-preload | 12:58:32.985 [main] INFO com.ontotext.config.AbstractParameter - Configured parameter 'do.load.data' to default value 'true'
graphdb-preload | 12:58:32.985 [main] INFO com.ontotext.rio.parallel.ParallelLoader - Data will be parsed + resolved + loaded.
graphdb-preload | 12:58:32.985 [main] INFO com.ontotext.config.AbstractParameter - Configured parameter 'graphdb.persistent.parallel.inferencers' to default value 'false'
graphdb-preload | 12:58:33.020 [main] INFO org.eclipse.rdf4j.sail.shacl.ShaclSail - Shapes will be persisted in: /opt/graphdb/home/data/repositories/cohd/shapes-graph/
graphdb-preload | Exception in thread "main" java.lang.IllegalStateException: Only graphdb repositories are supported
graphdb-preload | at com.ontotext.graphdb.loadrdf.BaseLoadTool.getSail(BaseLoadTool.java:153)
graphdb-preload | at com.ontotext.graphdb.loadrdf.BaseLoadTool.createRepositoryInSystemLocation(BaseLoadTool.java:231)
graphdb-preload | at com.ontotext.graphdb.loadrdf.BaseLoadTool.mainInternal(BaseLoadTool.java:132)
graphdb-preload | at com.ontotext.graphdb.loadrdf.PreloadData.main(PreloadData.java:2175)
The error seems to indicate GraphDB does not recognize the type provided, but not sure which one it is, but it has been generated by GraphDB itself so really no idea
Note that this is working when using a previous "config.ttl" without SHACL validation enabled.
It is quite strange that GraphDB fails to read the file it generates
On GraphDB Free 9.3.0
Graphdb 10.3
Cluster 2 nodes
init for creating a repo and seeding the repo with triples
The (free) docker image is currently broken before it depends on adoptopenjdk/openjdk11:alpine
, which always results in the latest version. A recent update in this image has updated the busybox-extras
package, which breaks line 14 of the Dockerfile; it tries to install busybox-extras=1.31.1-r20
, which conflicts with the installed busybox-extras=1.32.1-r6 package
.
As this can keep happening each time the base image gets updated, I would suggest to pin the version number (the current version would adoptopenjdk/openjdk11:jre-11.0.11_9-alpine
). This version conflict also suggests there's no need to install the busybox-extras
package at all, it seems to be a part of the base image.
Currently, no image is tagged with latest
at Docker Hub
~ » docker pull ontotext/graphdb
Using default tag: latest
Error response from daemon: manifest for ontotext/graphdb:latest not found
It's what people run by default even if running with a specific tag works, e.g.
~ » docker run ontotext/graphdb:8.5.0-se
Unable to find image 'ontotext/graphdb:8.5.0-se' locally
8.5.0-se: Pulling from ontotext/graphdb
6d827a3ef358: Pull complete
...
Hi,
I was installing GraphDB free using Docker for M1 but something went wrong. I'm sharing the error with you. Hope this can help.
make free VERSION=9.7.0
docker build --no-cache --pull --build-arg edition=free --build-arg version=9.7.0 -t ontotext/graphdb:9.7.0-free free-edition
[+] Building 1.1s (7/7) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 168B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/adoptopenjdk/openjdk11:latest 0.6s
=> [internal] load build context 0.0s
=> => transferring context: 1.14kB 0.0s
=> CACHED [1/3] FROM docker.io/adoptopenjdk/openjdk11@sha256:c17ddb3fdbef744ff88721fb 0.0s
=> [2/3] ADD graphdb-free-9.7.0-dist.zip /tmp 0.2s
=> ERROR [3/3] RUN apk add --no-cache bash util-linux procps net-tools busybox-extras 0.2s
------
> [3/3] RUN apk add --no-cache bash util-linux procps net-tools busybox-extras wget less curl && mkdir -p /opt/graphdb && cd /opt/graphdb && unzip /tmp/graphdb-free-9.7.0-dist.zip && rm /tmp/graphdb-free-9.7.0-dist.zip && mv graphdb-free-9.7.0 dist && mkdir -p /opt/graphdb/home:
#7 0.167 /bin/sh: 1: apk: not found
Same result if I do make free
or cd free-edition; build .
[+] Building 4.9s (6/7)
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 37B 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/adoptopenjdk/openjdk11:alpine 4.7s
=> [internal] load build context 0.0s
=> => transferring context: 2B 0.0s
=> CANCELED [1/3] FROM docker.io/adoptopenjdk/openjdk11:alpine@sha256:e5 0.0s
=> => resolve docker.io/adoptopenjdk/openjdk11:alpine@sha256:e545ffc9928 0.0s
=> => sha256:e545ffc99287681de52cba0bdb95d25b424d189243f9de6 433B / 433B 0.0s
=> => sha256:a69a7772a25336de63c8b383269063aa78b4c93003e3f53 952B / 952B 0.0s
=> => sha256:ea252749293ea8bda477e3da921b7576a49f0ca2a8d 6.13kB / 6.13kB 0.0s
=> ERROR [2/3] ADD graphdb-free-9.1.1-dist.zip /tmp 0.0s
------
> [2/3] ADD graphdb-free-9.1.1-dist.zip /tmp:
------
failed to compute cache key: "/graphdb-free-9.1.1-dist.zip" not found: not found
I suggest adding Semver image tags. This will make graphdb-docker a lot more appealing for users. You could for instance depend on a major version tag like ontotext/graphdb:9-se that allows you to transparently get new minor and bugfix versions of GraphDB SE.
A good example on Docker Hub how it may look like: Docker registry
The command on the docker hub page:
docker run -p 127.0.0.1:7200:7200 --name graphdb-instance-name -t ontotext/graphdb:tag -Dgraphdb.global.page.cache=3G
Throws an error as the global page cache is a boolean according to graphdb.
I currently got no errors with:
-Dgraphdb.global.page.cache=true -Dgraphdb.page.cache.size=3G
but not sure if this is the best way to increase the memory for the docker image.
It would be nice not having to build the preload image and instead just pull it from dockerhub. This would allow us to have a streamlined deployment, only pulling from dockerhub and not needing to git clone this repo, making sure that it's up to date, etc.
I have a database with around 20 billion statements. When using the import rdf tool (going off issue #46) and setting the entity index size to 20000000000
, I get the error below. I'm guessing this value is a 32 bit int - can probably be fixed by allowing it to be a long
17:53:30.220 [main] ERROR com.ontotext.graphdb.GraphDBRepositoryManager - Error while attempting to create repository: entity-index-size has to be a number.
org.eclipse.rdf4j.repository.config.RepositoryConfigException: entity-index-size has to be a number.
at com.ontotext.graphdb.GraphDBRepositoryManager.validateConfiguration(GraphDBRepositoryManager.java:566)
at com.ontotext.graphdb.GraphDBRepositoryManager.addRepositoryConfig(GraphDBRepositoryManager.java:481)
at com.ontotext.graphdb.importrdf.BaseLoadTool.createRepositoryInSystemLocation(BaseLoadTool.java:314)
at com.ontotext.graphdb.importrdf.BaseLoadTool.mainInternal(BaseLoadTool.java:197)
at com.ontotext.graphdb.importrdf.Preload.call(Preload.java:254)
at com.ontotext.graphdb.importrdf.Preload.call(Preload.java:55)
at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
at picocli.CommandLine.execute(CommandLine.java:2078)
at com.ontotext.graphdb.importrdf.ImportRDF.main(ImportRDF.java:31)
Following the container documentation, the container was build without a license (free).
However, I'm not sure what is possible except gazing at the workbench UI because I get the following error when executing an RDF import:
"could not send file for import: no software license set"
Maybe openjdk:8-jdk-alpine could be used to produce smaller images ?
How can I set up Lucene at build time similarly to loadrdf
?
Facing the following error while building the docker image:
ADD failed: file not found in build context or excluded by .dockerignore: stat graphdb-free-9.3.0-dist.zip: file does not exist
ERROR: Service 'graphdb' failed to build : Build failed
From where I can find the graphdb free zip/deb file?
A few small issues I've noticed on the page https://hub.docker.com/r/ontotext/graphdb/
Would be nice to have Graphdb running as a different user then root. This is actually docker best practice.
The graphdb.external-url configuration flag doesn't seem to be respected.
For example, the following should result in all sorts of 404's when visiting localhost:7200 - because the base URL should be looking at 127.0.0.1:7200/graphdb (and thus 404ing). But it works, demonstrating that Dgraphdb.external-url isn't being picked up.
I confirmed that when I docker exec into the container and check the value of graphdb.external-url
, in graphdb.properties - it's not set
docker run -p 127.0.0.1:7200:7200 --name graphdb-instance-name -t ontotext/graphdb:10.3.0 -Dgraphdb.external-url=http://localhost/graphdb/
Alternatively, here's part of a docker-compose file. I'll note that some parameters have been confirmed to work. For example, we can customize the port number through GDB_JAVA_OPTS - but not the base deployment address.
# Modified from https://github.com/Ontotext-AD/graphdb-docker/tree/master
services:
graphdb:
container_name: graphdb
image: ontotext/graphdb:10.1.0
restart: unless-stopped
environment:
GDB_JAVA_OPTS: >-
-Dgraphdb.home=/opt/graphdb/home
-Dgraphdb.workbench.importDirectory=/opt/graphdb/home/graphdb-import
-Dgraphdb.external-url=localhost/graphdb/
-Denable-context-index=true
-Dentity-pool-implementation=transactional
-Dhealth.max.query.time.seconds=600
-Dgraphdb.append.request.id.headers=true
-Dreuse.vars.in.subselects=true
When I run make free Version=9.2.1
it starts building but then fails
`docker build --no-cache --pull --build-arg edition=free --build-arg version=9.2.1 -t ontotext/graphdb:9.2.1-free free-edition
Sending build context to Docker daemon 3.584kB
Step 1/12 : FROM adoptopenjdk/openjdk11:alpine
alpine: Pulling from adoptopenjdk/openjdk11
Digest: sha256:66f72af3a9f4a74820fbda9ddc334a1e23233e623c54e506a5917b7861718a8c
Status: Image is up to date for adoptopenjdk/openjdk11:alpine
---> 35f78a22b3a9
Step 2/12 : ARG version=9.1.1
---> Running in 83f13827e8ab
Removing intermediate container 83f13827e8ab
---> 693597377b1d
Step 3/12 : ARG edition=free
---> Running in 075d91e668e2
Removing intermediate container 075d91e668e2
---> bbb004f91a89
Step 4/12 : ENV GRAPHDB_PARENT_DIR=/opt/graphdb
---> Running in 71bc4a2e546f
Removing intermediate container 71bc4a2e546f
---> dd421c6f3b44
Step 5/12 : ENV GRAPHDB_HOME=${GRAPHDB_PARENT_DIR}/home
---> Running in 645d04a096ff
Removing intermediate container 645d04a096ff
---> c98361c80912
Step 6/12 : ENV GRAPHDB_INSTALL_DIR=${GRAPHDB_PARENT_DIR}/dist
---> Running in 411e1570a978
Removing intermediate container 411e1570a978
---> b348d3b3db0f
Step 7/12 : ADD graphdb-${edition}-${version}-dist.zip /tmp
---> 9368882f53d9
Step 8/12 : RUN apk add --no-cache bash util-linux procps net-tools busybox-extras wget less curl && mkdir -p ${GRAPHDB_PARENT_DIR} && cd ${GRAPHDB_PARENT_DIR} && unzip /tmp/graphdb-${edition}-${version}-dist.zip && rm /tmp/graphdb-${edition}-${version}-dist.zip && mv graphdb-${edition}-${version} dist && mkdir -p ${GRAPHDB_HOME}
---> Running in b8e8d9fb3aa0
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/v3.14/community/x86_64/APKINDEX.tar.gz
(1/39) Installing ncurses-terminfo-base (6.2_p20210612-r0)
(2/39) Installing ncurses-libs (6.2_p20210612-r0)
(3/39) Installing readline (8.1.0-r0)
(4/39) Installing bash (5.1.4-r0)
Executing bash-5.1.4-r0.post-install
(5/39) Installing busybox-extras (1.33.1-r6)
Executing busybox-extras-1.33.1-r6.post-install
(6/39) Installing ca-certificates (20191127-r5)
(7/39) Installing brotli-libs (1.0.9-r5)
(8/39) Installing nghttp2-libs (1.43.0-r0)
(9/39) Installing libcurl (7.79.1-r0)
(10/39) Installing curl (7.79.1-r0)
(11/39) Installing less (581-r1)
(12/39) Installing mii-tool (1.60_git20140218-r2)
(13/39) Installing net-tools (1.60_git20140218-r2)
(14/39) Installing libintl (0.21-r0)
(15/39) Installing libproc (3.3.17-r0)
(16/39) Installing procps (3.3.17-r0)
(17/39) Installing libblkid (2.37.2-r0)
(18/39) Installing blkid (2.37.2-r0)
(19/39) Installing libcap-ng (0.8.2-r0)
(20/39) Installing setpriv (2.37.2-r0)
(21/39) Installing libmount (2.37.2-r0)
(22/39) Installing libsmartcols (2.37.2-r0)
(23/39) Installing findmnt (2.37.2-r0)
(24/39) Installing mcookie (2.37.2-r0)
(25/39) Installing hexdump (2.37.2-r0)
(26/39) Installing lsblk (2.37.2-r0)
(27/39) Installing libuuid (2.37.2-r0)
(28/39) Installing libfdisk (2.37.2-r0)
(29/39) Installing sfdisk (2.37.2-r0)
(30/39) Installing cfdisk (2.37.2-r0)
(31/39) Installing partx (2.37.2-r0)
(32/39) Installing flock (2.37.2-r0)
(33/39) Installing logger (2.37.2-r0)
(34/39) Installing uuidgen (2.37.2-r0)
(35/39) Installing libeconf (0.3.8-r1)
(36/39) Installing util-linux (2.37.2-r0)
(37/39) Installing libunistring (0.9.10-r1)
(38/39) Installing libidn2 (2.3.1-r0)
(39/39) Installing wget (1.21.1-r1)
Executing busybox-1.33.1-r6.trigger
Executing ca-certificates-20191127-r5.trigger
Executing glibc-bin-2.33-r0.trigger
/usr/glibc-compat/sbin/ldconfig: /usr/glibc-compat/lib/ld-linux-x86-64.so.2 is not a symbolic link
OK: 32 MiB in 56 packages
Archive: /tmp/graphdb-free-9.2.1-dist.zip
unzip: short read
The command '/bin/sh -c apk add --no-cache bash util-linux procps net-tools busybox-extras wget less curl && mkdir -p ${GRAPHDB_PARENT_DIR} && cd ${GRAPHDB_PARENT_DIR} && unzip /tmp/graphdb-${edition}-${version}-dist.zip && rm /tmp/graphdb-${edition}-${version}-dist.zip && mv graphdb-${edition}-${version} dist && mkdir -p ${GRAPHDB_HOME}' returned a non-zero code: 1
make: *** [Makefile:4: free] Error 1
`
Hi,
I'm having problems to acces resources in monitor section. I've dockerized graphdb running and all is working well except this section. I supose that the problem is with cgroups or something.
This is the error:
Jolokia error: Error: java.lang.UnsupportedOperationException).. Refresh the page to retry.
Any ideas?
Hi,
I'm following the instructions to install the free edition. I've registered and been given several download options in the email:
Download available for Windows, Mac, deb based Linux, rpm based Linux
The instructions on this repo simply say:
Register on the Ontotext website for the GraphDB Free edition. Download the zip file and place it in the free-edition subdirectory
Further guidance on which distribution to use would be helpful :)
Thanks
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.