Fork of https://github.com/oxigraph/oxigraph.git for the purpose of NextGraph project
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
maxlath
94f2bc4929
|
4 years ago | |
---|---|---|
.. | ||
README.md | 4 years ago | |
publish_docker_images.sh | 4 years ago |
README.md
docker-oxigraph
Oxigraph in a Docker container.
Summary
Display the help menu
docker run --rm oxigraph/oxigraph --help
Run the web server
Expose the server on port 7878
of the host machine, and save data on the local ./data
folder
docker run --init --rm -v $PWD/data:/data -p 7878:7878 oxigraph/oxigraph -b 0.0.0.0:7878 -f /data
You can then access it from your machine on port 7878
:
# Open the GUI in a browser
firefox http://localhost:7878
# Post some data
curl http://localhost:7878 -H 'Content-Type: application/x-turtle' -d@./data.ttl
# Make a query
curl -H 'Accept: application/sparql-results+json' 'http://localhost:7878/query?query=SELECT%20*%20%7B%20%3Fs%20%3Fp%20%3Fo%20%7D%20LIMIT%2010'
Run the web server for Wikibase
docker run --init --rm -v $PWD/wikibase_data:/wikibase_data -p 7878:7878 oxigraph/oxigraph-wikibase -b 0.0.0.0:7878 -f /wikibase_data --mediawiki-api http://some.wikibase.instance/w/api.php --mediawiki-base-url http://some.wikibase.instance/wiki/
⚠️ the Wikibase instance needs to be accessible from within the container. The clean way to do that could be to have both your wikibase and oxigraph in the same docker-compose.yml
.
Build local image
server image
# Build with no build context, just the Dockerfile
cat Dockerfile | docker build -t oxigraph -
Wikibase server image
# Same, simply replacing the entrypoint
cat Dockerfile | sed s/oxigraph_server/oxigraph_wikibase/ | docker build -t oxigraph-wikibase -