hobbit-project / platform

HOBBIT benchmarking platform
GNU General Public License v2.0
23 stars 9 forks source link

Issue starting Virtuoso with docker-compose #25

Closed mjovanovik closed 7 years ago

mjovanovik commented 7 years ago

I'm trying to start Virtuoso as part of the platform, using docker-compose up virtuoso. Whenever I try this, Virtuoso keeps shutting down immediately, with a report stating that it is missing the virtuoso.ini file.

$ docker-compose up virtuoso
Creating vos
Attaching to vos
vos                    |
vos                    |                Wed Apr 05 2017
vos                    | 09:57:37 There is no configuration file virtuoso.ini
vos exited with code 1

Apparently, the mount of the config/db directory is not successful, as it contains the necessary virtuoso.ini file.

I'm using CentOS 7.3, the file system is xfs, while docker and docker-compose have root permissions.

mjovanovik commented 7 years ago

I managed to solve the issue. The platform was placed on a mounted file system, so docker needed a privileged status for gaining access to the config/db directory.

The solution is to add the --privileged=true flag in a docker run command, or in the case of the platform, to add a new privileged: true line in docker-compose.yml for the service in question:

  # Triple store
  virtuoso:
    privileged: true
    image: openlink/virtuoso_opensource:vos
    container_name: vos
    hostname: vos
    volumes:
      - ./config/db:/opt/virtuoso-opensource/var/lib/virtuoso/db
    networks:
      - hobbit-core
    ports:
      - "8890:8890"

If this solves your problem too, you will need to add the privileged: true setting for all services in docker-compose.yml which use a volume: platform-controller, keycloak and virtuoso.