How do I run the Hetionet v1.0 docker container?

2019-05-29 19:24发布

问题:

I'm trying to run the Hetionet v1.0 docker container mentioned in this SO post.

  1. I've setup a digitalocean droplet with Docker
  2. I ran docker pull dhimmel/hetionet and it worked
  3. Now I run docker run dhimmel/hetionet and the following happens (and never returns to the interactive shell prompt).

If that completed successfully I think the last thing I'm supposed to do is run sh ~/run-docker.sh. Furthermore nothing is live at my droplet's ip_address:7474.

The error in the screenshot above looks a lot like it could be related to some redundant @Path("/") annotation, as described in this SO post's comment, buried in the docker container but I'm not sure.

Is the output from running docker run dhimmel/hetionet supposed to hang my shell? I'm running a 2 GB Memory / 40 GB Disk Droplet on Ubuntu 16.04 with Docker 1.12.5.

回答1:

Thanks for your interest in the Hetionet Docker.

The output in 3 is expected. It looks like a Docker container successfully launched, downloaded the Hetionet database, and launched the Neo4j server. I'll look into fixing the warnings, but they're not errors, as Neo4j is still launching.

For production, we use a more advanced Docker run command. Depending on your use case, you may want to use the development docker run command:

docker run \
  --publish=7474:7474 \
  --publish=7687:7687 \
  --volume=$HOME/neo4j/hetionet-data:/data \
  --volume=$HOME/neo4j/hetionet-logs:/var/lib/neo4j/logs \
  dhimmel/hetionet

Both the production and development command map ports. This will make it so the Neo4j server running inside your Docker container is available at http://localhost:7474/. This is most likely what you want. If you're doing this on DigitalOcean, you would replace http://localhost with the IP address of your droplet.

For an interactive shell session in a dhimmel/hetionet container, you can use:

docker run --interactive --tty dhimmel/hetionet bash

However, that command does not launch the Neo4j server -- it just let's you explore the image.

Does this clear things up?