stain / jena-docker

Docker image for Apache Jena riot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

tdbloader2: command not found

ldesousa opened this issue · comments

This is the docker-compose.yml:

version: '3.3'

services:
  virtuoso:
    image: stain/jena-fuseki:latest

    container_name: fuseki

    ports:
      - 3030:3030

    volumes:
      - ./data:/fuseki

    environment:
      - ADMIN_PASSWORD=secret
      - TBD=2
      - JVM_ARGS=-Xmx2g

Starting up and testing tdbloader2:

$ docker-compose up -d
Starting fuseki ... done

$ docker ps
CONTAINER ID   IMAGE                                   COMMAND                  CREATED          STATUS         PORTS                                                                                  NAMES
df9b246004e8   stain/jena-fuseki:latest                "/docker-entrypoint.…"   13 minutes ago   Up 7 seconds   0.0.0.0:3030->3030/tcp, :::3030->3030/tcp                                              fuseki

$ docker exec -it fuseki /bin/bash -c 'tdbloader2'
/bin/bash: tdbloader2: command not found

There is always the UI to load knowledge graphs, but the command line is more convenient. Thank you for reading.

I’m not an expert but run across the same issue: It does not know the path location, so better provide the full path of tdbloader2. I used it once to import a backup (see #74 (comment) step 4, needs also the full path to the database location!), it works like:

docker exec -it container-name-of-fuseki-app  /bin/bash -c "/jena-fuseki/tdbloader2 --help"

Example of importing n-quad data to the database "my-data-base-name" (all databases are located in /fuseki/databases/…)

docker exec -it container-name-of-fuseki-app  /bin/bash -c "\
 /jena-fuseki/tdbloader2 \
 --loc /fuseki/databases/my-data-base-name  \
  /path-to-import-data-within-docker-container/backup-or-something.nq.gz \
"

What tdbloader2 can do you have to read the official Apache Jena Fuseki documentations.