Sign inSign up

cruftlab/gremlin-console

By cruftlab

•Updated over 8 years ago

Docker image containing the Tinkerpop Gremlin Console

Image
0

259

cruftlab/gremlin-console repository overview

⁠Gremlin Console

This Docker image contains the Gremlin Console⁠ (running on Java 8). It also allows configuration via the /conf directory, and has another volume mounted, where you can export and import data.

⁠Run the console

To run the console, and mount the configuration and data directories (~/temp/gremlin-conf/ and ~/temp/gremlin-data, respectively), run the following command:

docker run -v ~/temp/gremlin-data:/opt/gremlin/data -v ~/temp/gremlin-conf:/opt/gremlin/conf/extra  --rm -it cruftlab/gremlin-console

⁠Configuration volume

You can mount configurations in the /opt/gremlin/data/extra volume. Here are a few examples of what you can do:

⁠Data volume

You can use the data volume to export and import data to your database. In the following examples ~/temp/gremlin-data is mounted to /opt/gremlin/data.

Read the docs⁠ for more information on how to use this volume, or read the examples below.

⁠Export graph

To export the "Modern" graph as GraphSON, run the following command in the console:

graph = TinkerFactory.createModern()
graph.io(graphson()).writeGraph("data/tinkerpop-modern.json")

The "Modern" graph will now be available in GraphSON format in ~/temp/gremlin-data/tinkerpop-modern.json

⁠Import graph

To import a graph from a GraphSON file, stored under ~/temp/gremlin-data/my-graph.json, run the following command in the console:

graph = TinkerGraph.open();
graph.io(graphson()).readGraph("data/my-graph.json");

Tag summary

Content type

Image

Digest

Size

275.4 MB

Last updated

over 8 years ago

docker pull cruftlab/gremlin-console