Public | Automated Build

Last pushed: 2 days ago
Short Description
Virtuoso 7 (stable) Open Source Edition on Ubuntu 14.04
Full Description


Virtuoso 7 (stable) Open Source Edition on Ubuntu 14.04

Note that this is based on the current stable/7 branch of Virtuoso.

Docker image




Virtuoso Open Source Edition
(C) 1998-2015 OpenLink Software

Docker image maintained by Stian Soiland-Reyes on behalf of the
Open PHACTS Foundation, based on
ansible-role-virtuoso by
Nolan Nichols


This docker image exposes ports 8890 (SPARQL/WebDAV) and 1111 (isql).

Virtuoso data is stored in the volume /virtuoso. If needed, you can modify
the virtuoso.ini by using /etc/virtuoso-opensource-7 as a volume.

Example of running Virtuoso to directly expose port 8890:

docker run -p 8890:8890 -d stain/virtuoso

You may want to specify an explicit volume path on the host to use a
particular host partition (e.g. for storage or speed requirements).
For example, to make Virtuoso use the folder /ssd/virtuoso on the host:

docker run -v /ssd/virtuoso/:/virtuoso -p 8890:8890 -d stain/virtuoso

Note that only a single container can access the /virtuoso volume at a time, otherwise you'll get:

14:36:57 Unable to lock file /virtuoso/virtuoso.lck (Resource temporarily unavailable).
14:36:57 Virtuoso is already runnning (pid 0)

Data volumes

It is good practice to use data volumes to
keep Virtuoso's data persistent across upgrades of the Virtuoso Docker image.

For example, to create a data container called virtuoso-data for the volume /virtuoso, and link to it from
a Virtuoso container called virtuoso:

docker run --name virtuoso-data -v /virtuoso busybox
docker run --name virtuoso --volumes-from virtuoso-data -p 8890:8890 -d stain/virtuoso

By using a named Docker container with --name, you can more easily stop and restart Virtuoso, e.g:

docker stop virtuoso
docker start virtuoso

To make Virtuoso start on boot and restart on failure, create the container with --restart=always:

docker run --name virtuoso --restart=always --volumes-from virtuoso-data -p 8890:8890 -d stain/virtuoso

If you need to replace an already created named container, remove the old container(s) first, including -v to also delete the volume content:

docker rm -v virtuoso
docker rm -v virtuoso-data # WARNING: Removes all data!


The command can be used with the volume /staging and the file
/staging/staging.sql to load data, typically using

First, if you are populating to an existing data volume, ensure that the corresponding
Virtuoso instance is not running:

docker stop virtuoso

To populate the data volume virtuoso-data (see above) by running
staging.sql from /data/rdf on the host:

docker run -v /data/rdf:/staging:ro --volumes-from virtuoso-data -it stain/virtuoso

(This uses the :ro parameter as Virtuoso would not be writing to its /staging.)

Note that the equivalent of /data/rdf/staging.sql must use /staging as base directory, example:

-- Gene Ontology
ld_dir('/staging/GO' , 'go_daily-termdb.owl.gz' , '' );
ld_dir('/staging/GO' , 'goTreeInference.ttl.gz', '');
ld_dir('/staging/GO' , 'go_daily-termdb.nt.gz' , '' );

-- GOA
ld_dir('/staging/GOA' , '*.rdf.gz' , '' );

After staging is complete, a total number of triples (including any present
before staging) will be output.

For example:

stain@docker:~$ docker stop virtuoso

stain@docker:~$ docker run -v /data/rdf:/staging:ro --volumes-from virtuoso-data -it stain/virtuoso
Populating from /staging/staging.sql
Total number of triples:

stain@docker:~$ docker restart virtuoso

Connecting with isql

To run an interactive isql session
to connect to the docker container myvirtuoso, try:

docker run --link myvirtuoso:virtuoso -it stain/virtuoso isql virtuoso


For this Docker image, feel free to
contribute, e.g.
raise an issue or
a pull request.

For all other questions on using and configuring Virtuoso, see the Virtuoso
support forums

and virtuoso-opensource issues.

Docker Pull Command
Source Repository

Comments (2)
2 years ago

@stilleben - the isql-v bug should now have been fixed. Note that now staging is an explicit command rather than done at start-up.

2 years ago

Thanks a lot for creating this image!<br/>
When I run the docker image as described, I get a working Virtuoso SPARQL endpoint at localhost:8890/sparql.

Whenever I try to load data with staging I get following error:

Virtuoso params: NumberOfBuffers 910462 ; MaxDirtyBuffers: 682846 Starting Virtuoso 
Configuring SPARQL 
/usr/local/bin/ line 23: isql-v: command not found

In my test I created a staging.sql with following entry:

ld_dir('/staging', 'test.nt', ''); 

and with test.nt containing some valid triples.