SemanticComputing / fuseki-docker

Apache Jena Fuseki with SeCo extensions
MIT License
33 stars 15 forks source link

How to use it with VSCode Dev Container? #22

Closed maneetgoyal closed 1 year ago

maneetgoyal commented 1 year ago

Here's my config:

// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/alpine
{
    "name": "Me and Jena",
    // Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
    "image": "secoresearch/fuseki:latest",
    "runArgs": ["-e ADMIN_PASSWORD=password", "-e ENABLE_DATA_WRITE=true", "-e ENABLE_UPDTAE=true", "-e ENABLE_UPLOAD=true", "-e QUERY_TIMEOUT=5000"],

    // Features to add to the dev container. More info: https://containers.dev/features.
    // "features": {},

    // Use 'forwardPorts' to make a list of ports inside the container available locally.
    "forwardPorts": [3030],

    // Use 'postCreateCommand' to run commands after the container is created.
    // "postCreateCommand": "uname -a",

    // Configure tool-specific properties.
    // "customizations": {},

    // Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
    "remoteUser": "root",

    // Ref: https://code.visualstudio.com/remote/advancedcontainers/add-local-file-mount
    "mounts": ["type=bind,source=${localWorkspaceFolder}/fuseki-data,target=/fuseki-base/databases"]
}

The container runs but not getting any response from the following localhost URLs:

[SPARQL 1.1 query](https://www.w3.org/TR/sparql11-query/): http://localhost:3030/ds/sparql
[Graph Store HTTP Protocol](https://www.w3.org/TR/sparql11-http-rdf-update/) (read-only): http://localhost:3030/ds/data
yoge1 commented 1 year ago

You need to add the following line to your config: "overrideCommand": false,

The "overrideCommand" property defaults to "true", meaning the CMD of the Dockerfile (image) is not run. For secoresearch/fuseki this means that Fuseki will not be started.