Skip to content
Patrick van Kleef edited this page Jan 9, 2019 · 4 revisions

OpenLink Virtuoso Open Source Edition 7.2 Docker Image

Copyright (C) 2019 OpenLink Software

QuickStart Guide

Table of Contents

Downloading the image

To pull the latest Virtuoso 7.2 docker image to your local system, you can use the following command:

$ docker pull openlink/virtuoso-opensource-7

To check the version of the Virtuoso binary, you can use the following command:

$ docker run openlink/virtuoso-opensource-7 version

This Docker image is using the following version of Virtuoso:
Virtuoso Open Source Edition (Column Store) (multi threaded)
Version 7.2.6-rc1.3230-pthreads as of Nov  2 2018 (4d226f4)
Compiled for Linux (x86_64-generic_glibc25-linux-gnu)
Copyright (C) 1998-2018 OpenLink Software

Creating a sample Virtuoso instance

Here is a quick example of how to create a new virtuoso instance on your system:

$ mkdir my_virtdb
$ cd my_virtdb
$ docker run \
    --name my_virtdb \
    --interactive \
    --tty \
    --env DBA_PASSWORD=mysecret \
    --publish 1111:1111 \
    --publish  8890:8890 \
    --volume `pwd`:/database \
    openlink/virtuoso-opensource-7:latest

This will create a new Virtuoso database in the my_virtdb subdirectory and starts a Virtuoso instance with the HTTP server listening on port 8890 and the ODBC / JDBC / ADO.Net / OLE-DB / ISQL data server listening on port 1111.

The docker image in running in foreground (with -i or --interactive) mode, so you can see what it is doing.

You should now be able to contact the Virtuoso HTTP server using the following URL:

http://localhost:8890/

You can shut down Virtuoso by pressing the CTRL and C buttons in that terminal session.

Passwords

When a new database is created, the docker image will use the Environment settings DBA_PASSWORD and DAV_PASSWORD to set passwords for the dba and dav user accounts.

If the DBA_PASSWORD Environment variable is not set, a random password will be assigned to the dba user account, and stored on the internal docker filesystem as /settings/dba_password.

If the DAV_PASSWORD Environment variable is not set, it will be set to the DBA_PASSWORD and stored as /settings/dav_password.

These files will only be readable by the user that started the image. Commands like the following may be used to reveal the randomised passwords:

$ docker exec -i -t my_virtdb cat /settings/dba_password

Without this password, you will not be able to log in to the dba account using either the isql tool or the Virtuoso Conductor.

NOTE: Users are advised to immediately change the password and then remove this file from the filesystem.

Persistent storage

In order to retain changes to the Virtuoso database, the database documents should be stored on the host file system.

The docker image exposes a /database volume that can be easily mapped to a local directory on the filesystem. If this directory is empty, the docker image will put an initial virtuoso.ini into the mapped directory and then proceeds to create a new database.

Stopping the image

When the docker image is running in foreground mode (with -i or --interactive), you can shut down Virtuoso by pressing the CTRL and C buttons in that terminal session. You can also use the following command on a different terminal:

$ docker stop my_virtdb

Restarting the image

Once the docker image has been registered with the docker run or docker create command on your local system, you can start it in the background using:

$ docker start my_virtdb

If you prefer to run the instance in foreground mode, you can use:

$ docker start -i -a my_virtdb

Checking the startup log

If the docker image is started in background (without -i or --interactive) mode, you can look at the recent output of the virtuoso process by running:

$ docker logs my_virtdb

Using isql to connect

To connect to your running Virtuoso instance, you can use the following command:

$ docker exec -i my_virtdb isql 1111

You will be prompted for the dba account password.

NOTE: If you provide an incorrect password multiple times, Virtuoso will lock the dba account for a couple of minutes.

Using an existing database

If the mapped directory contains a virtuoso.ini and accompanying database documents, the new docker image will attempt to use these.

NOTE: Directory paths referenced in the virtuoso.ini should be relative to the internal directory structure of the docker image in order to work.